Re: mktime fails for pre 1970 on Fedora 3
- From: gordon@xxxxxxxxxxxxxxxxx (Gordon Burditt)
- Date: Wed, 30 Nov 2005 04:27:28 -0000
>> 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
.
- References:
- mktime fails for pre 1970 on Fedora 3
- From: zaphod
- Re: mktime fails for pre 1970 on Fedora 3
- From: Tim Roberts
- Re: mktime fails for pre 1970 on Fedora 3
- From: gunzip
- mktime fails for pre 1970 on Fedora 3
- Prev by Date: Re: mktime fails for pre 1970 on Fedora 3
- Next by Date: Re: Domain Name of curent user
- Previous by thread: Re: mktime fails for pre 1970 on Fedora 3
- Next by thread: Re: mktime fails for pre 1970 on Fedora 3
- Index(es):