[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Year 2000 and samba...



thb@regioservice.de (Thomas Baetzler) writes:

> James C. Carr wrote:
> :	As far as I've been told, though I haven't actually tried it,
> :the Linux kernel functions up to the year 2037.  How that works, I'm
> :not entirely sure...
> 
> The Unix timestamp is represented as time_t, which is usually a signed
> long value. A date is represented a the number of seconds elapsed since 
> January 1st 1970, 0:00:00. The easy way to figure out the wrap date is
> by running the following code: 

I think there were a couple of typos in the code you included.  I
believe it should read
-snip-
#include <stdio.h>
#include <limits.h>
#include <time.h>

void main( int argc, char **argv )
{
	time_t wrap_tm = LONG_MAX;
	
	printf("Wrap will occur at %s", asctime( gmtime(&wrap_tm) ) );
}
-snip-


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: