Re: strptime cannot parse date older than 1938
Re: strptime cannot parse date older than 1938
- Subject: Re: strptime cannot parse date older than 1938
- From: "Surf Chen" <email@hidden>
- Date: Thu, 24 Apr 2008 15:53:00 +0800
The Y2038 bug is the unix stamp time range(1970-2038)? I know that
and know what difference of long between 32 and 64.
But I think strptime is not relative to this issue,since the struct tm
store each date parts in a int or a char*,not like the unix timestamp
store as a long.
And the codes works fine on my 32bit debian.
btw:The "older" word cannot be used to compare tow date? If so,I am
Sorry for my bad English..
On Thu, Apr 24, 2008 at 2:46 PM, Martin Costabel <email@hidden> wrote:
> Surf Chen wrote:
>
> >
> > The manpage(man 3 strptime) says:
> >
> > Two-digit year values, including formats %y and %D, are now interpreted
> > as beginning at 1969 per POSIX requirements. Years 69-00 are
> interpreted
> > in the 20th century (1969-2000), years 01-68 in the 21st century
> > (2001-2068).
> >
>
> You mean "strptime cannot parse date later than 2038".
> The famous Y2038 bug.
>
> If you compile your program with the compiler flag "-arch x86_64" or "-arch
> ppc64", you get the correct result.
>
> --
> Martin
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden