Re: Y2K

Richard B. Johnson (root@chaos.analogic.com)
Fri, 19 Jun 1998 10:46:42 -0400 (EDT)


On Fri, 19 Jun 1998, Rogier Wolff wrote:

> Richard B. Johnson wrote:
> >
> > On Fri, 19 Jun 1998, Densin Roy. wrote:
>
> > > What is first kernel and first libc that Y2K complaint?
>
> > Neither the kernel nor the C runtime library cares anything about
> > the year 2000. It is just a number presented for humans to read as
> > the internal time is parsed into ss:mm:hh:mm:dd:yyyy, etc.
>
> This is not true. The question is: since when is THIS code snippet
> in the linux kernel?
>
> linux/arch/i386/kernel/time.c: get_cmos_time:
>
> if ((year += 1900) < 1970)
> year += 100;
>

The Century byte in the CMOS is not updated by the CMOS timer chip.
If you set the CMOS time sometime soon after the new Century, i.e.,
in the first 99 years (clock -w), it will be updated.

This snippet is to protect you in the meantime!

> >
> > Problems will occur at (I think I remember) the year 2054 because
> > the time_t integer is not large enough. By that time, we should all have
> > 256-bit machines so the problem should go away.

The 2054 was for VAX/VMS with their quadword millisecond time. This is
why I remembered that date.

> The date is in 2038. That's when there have been 2^31 seconds since
> 1970. With some hacks, we will be able to buy ourselves another 68
> years by using the 32nd bit too (loosing support for negative
> times: 1902-1970).
>
> Roger.

Of course we need to have accurate file/date/time for paper tape <grin>.

Cheers,
Dick Johnson
***** FILE SYSTEM MODIFIED *****
Penguin : Linux version 2.1.105 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu