Re: Does 'squid Internet Object Cache' ready for Year 2000?

From: Goran Oberg <goggi@dont-contact.us>
Date: Fri, 13 Jun 1997 16:18:47 +0200

> > We are an academic institution and preparing a checklist of Year 2000
> > Compliant software. We are using "squid" under our Unix machines,
> > and would like to know whether "squid" can correctly functioning
> > beyond Year 2000. Since we use different versions of "squid" under
>
> It can - it uses the generic Unix time format which is valid until
> something like 2030...

Here's part of the output of a short test program (source below):

 Year : 2037 (time == 2128487044)
   ctime == Sat Jun 13 06:24:04 2037
   gmtime == Sat Jun 13 06:24:04 2037
 Year : 2038 (time == -2134923326)
   ctime == Thu May 8 05:44:34 1902
   gmtime == Thu May 8 05:44:34 1902

For some strange reason is time_t, wich is the type of the number of seconds
since epoch, signed. Beats my you would need to have it signed, but that's the
case.

The break therefore at 2147483647 (2^31-1), after that it's back to 1901. This
may vary between different unixes, I use Solaris 2.5.1.

Here's what happens at 2147483647 seconds after epoch:

> perl -e 'print gmtime(2147483647) . "\n"'
Tue Jan 19 03:14:07 2038
> perl -e 'print gmtime (2147483648) . "\n"'
Fri Dec 13 20:45:52 1901

Here's the short hacks you could try to verify it on your own systems:

Received on Fri Jun 13 1997 - 07:19:11 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:31 MST