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

Re: system time



On Sat, Sep 02, 2000 at 10:35:34PM -0500, Paul T.McNally wrote:
> Thomas J. Hamman wrote:
> > 
> > 
> > 
> > I should add in that the change is usually by 5 hours, which is my
> > timezone's offset from GMT, so I've been wondering if maybe I
> > accidentally picked the wrong setting concerning the hardware clock
> > being set to GMT during installation.  I can't find where that setting
> > is configured though (and tzconfig doesn't include it).
> > 
> > 
> The time should not vary, but that does sound interesting. I just
> figured out how to change the time from gmt to local:
> 
> Date 0902215100
> 
> Breaks down to:
> 
> 0902 (Date)
> 
> 2151 (Time)
> 
> 00 (Year)

are you the betting type? :)

internally, unix/linux stores date/time values as the number
of seconds since january 1, 1970. the biggest snafu with this
paradigm is, "midnight, which time zone?" when you request
a human-friendly format, it's converted into years, months,
days/leapdays, hours, minutes, seconds.

try this:
	% date ; perl -e 'print time,"\n"' ;
	Mon Sep  4 18:11:58 CDT 2000
	968109118
	% date ; perl -e 'print time,"\n"' ;
	Mon Sep  4 18:13:23 CDT 2000
	968109203


our current date (2000 sept 4) is in the 968100000's...



Reply to: