Re: strptime cannot parse date older than 1938
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=m6I/1KqHpxJlXRCP06AhFE+O5wyJUtFXHEsgj+Y6GtQ=; b=N89IAjwYHIlCpRZNd+xSLWyDJa4oLQYbgzXSALFqFJR9dnuK+0jZCLXrqzxd1duDZ/ZdiYyGJI1hKgS+lhcKwktanxodoFKGcFRIhuNrsIFV2Nl3SH5kh23DqWn3eXIRm3/JOxFXsqq+fLLNM1BhLvkim+g90NYKmU8nKbDc8T4= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OWE4aKp4ufh+EFKudEDO19JhTMDKMh1XQq2GN3dzRQweNSTX3i5gNcAqNkR7Hj7CRQPsqkloQ66T9dgNPAF2A57kTWa9xWtCA7HjGzGj5NLqeP8NNWKiKykG8PgLxDFaxwh00IK1ukZij7tsCebfgNioDkQnSELQeBLhtDhfuko= 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 <costabel@wanadoo.fr> 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Surf Chen