|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker mailing list Archives
[ curl-Bugs-1230118 ] curl_getdate(), DST, and cookie expiration
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 14 Mar 2006 11:31:57 -0800
Bugs item #1230118, was opened at 2005-06-30 03:27
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
With the system clock properly configured to
The following demonstrates the problem:
#include <stdio.h>
int main()
::memcpy(&tmGMT, ::gmtime(&tNow), sizeof(tm));
time_t tCURL = ::curl_getdate(szGMT, NULL);
printf("Current time: %s\n", szGMT);
return 0;
-----------------------------------------------------------
Current time: Thu, 30-Jun-2005 03:02:14 GMT
-----------------------------------------------------------
Current time: Thu, 30-Jun-2005 03:02:28 GMT
----------------------------------------------------------------------
Comment By: Rouslan Grabar (russ777)
Message:
const char *env = getenv("TZ");
Note the underscore in _putenv. This version of putenv does
:)
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Message:
Great!
I've just committed this fix. Closing this, considered fixed.
----------------------------------------------------------------------
Comment By: Gisle Vanem (giva)
Message:
Something like:
before time() makes the difference 0.
AFAIK, $TZ is only used by libc (msvcrt.dll). The official info
http://msdn.microsoft.com/library/default.asp?url=/library/en-
We should be able to use that (bias) in case $TZ isn't defined.
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Message:
Ok. Now we're getting somewhere!
Is there any (Windows-) way we can figure out what timezone
Thanks Gisle!
----------------------------------------------------------------------
Comment By: Gisle Vanem (giva)
Message:
Without an environment variable "TZ=GMT+1" I'm getting the
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Message:
I don't have/use windows myself. Without assistance I can't
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Message:
Can you check what mktime() returns for this setup with and
I can't but suspect that this is yet another chapter in the
http://www.codeproject.com/datetime/dstbugs.asp
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Message:
I'm puzzled.
Why is "automatic DST adjustment" ? Isn't that the thing
If so, how on earth can that affect the date functions like
libcurl is simply using mktime() and gmtime(). I don't see
----------------------------------------------------------------------
You can respond by visiting:
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info