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:43:26 +0800
It is 70 ,not 69.
Almost(few such as 1,Jan,2038 is parsed correctly) date strings later
than 2038 is parsed as 70.
On Thu, Apr 24, 2008 at 2:28 PM, Steve Checkoway <email@hidden> wrote:
>
> On Apr 23, 2008, at 10:09 PM, Surf Chen wrote:
>
>
> >
> > If the parsing date > certain date,the strptime dose not work like it on
> linux.
> >
> > On my debian box, the output is 138
> > but on Mac OSX,output is 70.
> >
>
> I really hope you mean 69.
>
>
>
> > 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).
> >
>
> Hmm, this seems like a bug. 69 is the number of years since 1969, but that
> field should be number of years since 1900, according to the man page
> ctime(3).
>
> --
> Steve Checkoway
>
> "Anyone who says that the solution is to educate the users
> hasn't ever met an actual user." -- Bruce Schneier
>
>
>
>
>
> _______________________________________________
> 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
>
_______________________________________________
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