On Wed, 17 Nov 2010 19:59:08 -0500, Arne Vajhøj wrote:
> On 17-11-2010 05:48, Martin Gregorie wrote:
>> UNIX had 32 bit time variables, hence its epoch was tiny: 68 years
>> (1970-203
. This is the shortest date range of any OS I've used.
>> Fortunately its since been upgraded to 64 bits, so the UNIX epoch will
>> now outlast the universe with a healthy margin for error.
>
> I don't think UNIX specify its size.
>
IIRC UNIX first appeared on the PDP-11, a 16 bit machine with a 32 bit
long int. A 16 bit date measured in seconds would never have worked, so
they must have used 32 bit because it was available and got standardised
on by default and used to define the time_t variable type. At least
that's my guess.
The 2038 date expiry has always been a feature of UNIX and that cut-off
is a clear fit with a signed 32 bit date.
> Many Unix'es has changed from 32 to 64 bit.
>
Yes, but when? Since 2000 for sure, but I have no idea when it happened.
Maybe only since 64 bit chips became common?
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |