Reply to Re: mktime fails for pre 1970 on Fedora 3

Your name:

Reply:


Posted by Gordon Burditt on 11/30/05 06:27

>> It's not glibc. It is much more deeply embedded in the depths of the
>> operating system. Just try to work with a date past February, 2038.
>
>I'm not referring to the 32/64 bit issue.

This isn't the 32/64 bit issue. This is the 31/32 bit issue.

>On some UNIX platforms, such as
>FreeBSD, mktime handles pre-1970 dates with a workable negative value. On
>many Linux distros all you get for anything before 1 Jan 1970 is -1. If
>Perl's Date::Calc can handle all this why can't PHP?

An OS with a 32-bit time_t has a choice. With the "negative" values
of a 32-bit integer, it can represent 1901-1969 or 2038-2106: pick
one. I take it Linux chose to handle 2038-2106, and you don't like
that choice.

I think POSIX says it's supposed to be unsigned, so arguably
Linux is right and the BSDs are wrong as far as standards compliance.


Gordon L. Burditt

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация