[uClibc]strptime and mktime problem
Andrew May
acmay at acmay.homeip.net
Wed Jun 18 20:50:24 UTC 2003
On Tue, Jun 17, 2003 at 10:00:18PM -0600, Manuel Novoa III wrote:
> Hello,
>
> On Tue, Jun 17, 2003 at 07:05:44PM -0700, Andrew May wrote:
> > I tried to just 0 out the documented
> > values before I called mktime, but in the 3rd line of the output
> > it shows the tm struct is hosed by the mktime call.
>
> Try setting the TZ env variable and see what happens. There seems
> to be some issue with PPC versions of gcc and the default uClibc
> timezone initialization code. This will throw off mktime(). See
> http://uclibc.org/lists/uclibc/2003-June/008653.html
> for more information on that. I tested with the latest uClibc
> on x86, arm, and ppc. Except for a daylight savings time issue
> on PPC, I got the samve values on all platforms when setting TZ.
>
> Since there seems to be a compiler issue for PPC and since that isn't
> a platform I use, investigating this further isn't a high priority
> for me. But if you want to play with this some more , I'll gladly look
> at whatever you come up with.
>
Well I set TZ in the shell and ran the program. I will attach the
results. It still does not seem correct.
-------------- next part --------------
/ # echo $TZ
/ # time_test
Mon 5 Mday -2147483648 Year 103 -2147483648:-2147483648.-2147483648 YDay -2147483648 Wday -2147483648
Mon 5 Mday 1 Year 103 00:00.00 YDay 0 Wday 0
Mon 11 Mday 7 Year 128 18:45.28 YDay 341 Wday 4 Stime1859827528
Mon 5 Mday -2147483648 Year 103 -2147483648:-2147483648.-2147483648 YDay -2147483648 Wday -2147483648
Mon 5 Mday 1 Year 103 00:00.00 YDay 0 Wday 0
Mon 5 Mday 1 Year 103 00:00.00 YDay 151 Wday 0 Stime1054425600
/ # export TZ=UTC
/ # time_test
Mon 5 Mday -2147483648 Year 103 -2147483648:-2147483648.-2147483648 YDay -2147483648 Wday -2147483648
Mon 5 Mday 1 Year 103 00:00.00 YDay 0 Wday 0
Mon 2 Mday 29 Year 103 02:03.44 YDay 87 Wday 6 Stime1054425600
Mon 5 Mday -2147483648 Year 103 -2147483648:-2147483648.-2147483648 YDay -2147483648 Wday -2147483648
Mon 5 Mday 1 Year 103 00:00.00 YDay 0 Wday 0
Mon 5 Mday 1 Year 103 00:00.00 YDay 151 Wday 0 Stime1059947776
/ # export TZ=PST
/ # time_test
Mon 5 Mday -2147483648 Year 103 -2147483648:-2147483648.-2147483648 YDay -2147483648 Wday -2147483648
Mon 5 Mday 1 Year 103 00:00.00 YDay 0 Wday 0
Mon 2 Mday 29 Year 103 02:03.44 YDay 87 Wday 6 Stime1054425600
Mon 5 Mday -2147483648 Year 103 -2147483648:-2147483648.-2147483648 YDay -2147483648 Wday -2147483648
Mon 5 Mday 1 Year 103 00:00.00 YDay 0 Wday 0
Mon 5 Mday 1 Year 103 00:00.00 YDay 151 Wday 0 Stime1059947776
/ #
More information about the uClibc
mailing list