George Toft wrote:
> 
> [snip]
> 
> Clue me in.  2^32 = 4294967296.  Divide that by 60 (for
> seconds),
> 60 (for minutes), 24 (for hours), and 365.24 (rough
> approximation 
> for years), and you get 136.1030271 years.  1970 + 136 is
> the
> year 2106.  
> 
> Any kernel hackers out there to help out?

The main problem is that the time functions use a signed int.
To get the last Unix date, try this program:

/* maxdate.c */
# include <stdio.h>
# include <time.h>
# include <limits.h> 

int main()
{
        time_t mydate = INT_MAX;
        printf("Max date = %s",ctime(&mydate));
        mydate++;
        printf("Max date + 1 = %s",ctime(&mydate));
        return 0;
}

If you compile this program and exec it, you can see:
# ./maxdate
Max date = Tue Jan 19 04:14:07 2038
Max date + 1 = Fri Dec 13 20:55:13 1901

Arnaud
-
To get out of this list, please send email to [EMAIL PROTECTED] with
this text in its body: unsubscribe suse-linux-e
Check out the SuSE-FAQ at http://www.suse.com/Support/Doku/FAQ/ and the
archiv at http://www.suse.com/Mailinglists/suse-linux-e/index.html

Reply via email to