a convert to lambda-ism

A

Arne Vajhøj

UNIX had 32 bit time variables, hence its epoch was tiny: 68 years
(1970-2038). 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.

Many Unix'es has changed from 32 to 64 bit.

Arne
 
M

Martin Gregorie

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?
 
A

Arne Vajhøj

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.

It has been a feature of most Unix implementations.

Unix as in SUS V3 only say:

time_t
Used for time in seconds.

time_t and clock_t shall be integer or real-floating types.
Yes, but when? Since 2000 for sure, but I have no idea when it happened.
Maybe only since 64 bit chips became common?

Sometime during the last 10 years seems likely.

Most compilers has supported 64 bit integers even in 32 bit mode.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top