Re: Bug 1230118: patch for curl_getdate() for win32
Date: Wed, 10 May 2006 00:11:25 +0200 (CEST)
On Tue, 9 May 2006, Dov Murik wrote:
Thanks for putting the light back on this old leftover problem!
> The problem with MSVCRT (Microsoft's libc) regarding the unexplained DST fix
> it applies to timestamps within April and October when the TZ environment
> variable is not set (yes, it's crazy, I know) was discussed here:
> and here:
> 1. russ777's last comment on sourceforge was not incorporated into curl. So
> I changed putenv to _putenv.
Do note that his comment was added quite a long time afterwards and that's
probably the reason it remained unnoticed.
> 2. I found that setting TZ with _putenv did not suffice (at least in MSVC6,
> I didn't test on other versions); I must explicitly call _tzset() to make
> the runtime library reread TZ's value.
Thinking about it, isn't this quite intrusive for apps that happen to also use
the TZ variable and thinking it would be something completely different?
> The patch I propose for parsedate.c solves this problem (compiled and tested
> on MSVC6).
Since these functions are in the libcs providing by the compiler makers, can
we be really sure that _all_ compiler manufacturers on Windows add a _putenv()
and _tzset() or won't we need some protective #ifdefs to only do this for
those compilers we know have them?
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-05-10