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: Martin Costabel <email@hidden>
- Date: Thu, 24 Apr 2008 11:45:04 +0200
Surf Chen wrote:
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.
The problem appears not to be the struct tm, but the conversion routine
that perhaps somewhere internally uses the type time_t.
And the codes works fine on my 32bit debian.
Well, on the Mac it only works if you compile for a 64bit architecture.
btw:The "older" word cannot be used to compare tow date? If so,I am
Sorry for my bad English..
You wrote "older than 1938" which is fine in English, but you did not
mean 1938, you meant 2038. If in your program you write 1938 instead of
38 and %Y instead of %y, everything is OK. If you write 2038 and %Y, you
get the same problem as for 38 and %y.
--
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