site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031) Thanks to the useful replies here. But I need to ask a final question:On Mac OSX and with 32 bit compile option, How to parse "Thu, 24-Apr-38 04:28:16 GMT" to struct tm or other structs like that? Do I need to down or write an alternative lib to parse it? struct tm { int tm_sec; /* seconds after the minute [0-60] */ int tm_min; /* minutes after the hour [0-59] */ int tm_hour; /* hours since midnight [0-23] */ int tm_mday; /* day of the month [1-31] */ int tm_mon; /* months since January [0-11] */ int tm_year; /* years since 1900 */ int tm_wday; /* days since Sunday [0-6] */ int tm_yday; /* days since January 1 [0-365] */ int tm_isdst; /* Daylight Savings Time flag */ long tm_gmtoff; /* offset from CUT in seconds */ char *tm_zone; /* timezone abbreviation */ }; -- Martin _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Terry Lambert wrote: On Apr 25, 2008, at 12:10 AM, Surf Chen wrote: You don't, it's out of range. What is out of range in struct tm? The only thing that can be out of range is the number of seconds from the Epoch, but this is not a member of struct tm: That's why it's called "The UNIX Y2038 bug". That's right, this is a bug. A bug in Apple's implementation of the strptime function. There is no mention of 2038 in the documentation of this function, and there is no reason why it should not work as advertised, even on a 32bit system. It's a bug that should be fixed. This email sent to site_archiver@lists.apple.com