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: Steve Checkoway <email@hidden>
- Date: Wed, 23 Apr 2008 23:28:36 -0700
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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