time_utc_vs_local

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: System clock still not right
From: Gregory Hosler <gregory.hosler@eno.ericsson.se>
Date: Mon, 06 Nov 2000 16:11:07 +0800 (SGT)

On 06-Nov-00 Vidiot wrote:
>>If you have UTC true.. then you need to set the hardware clock to GMT. For
>>US/Central (GMT-6) if your localtime were, say, 12:00 then the hardware
>>clock should be 18:00. As far as why you're not getting the right dates on
>>stuff.. I'm sure it's something simple which someone will figure out. I
>>just wanted to note that the setup with the UTC and daylight
>>saving(s) time only really works when you have the hardware clock set to
>>GMT (GMT is neeto) :P
> 
> I've tried setting the UTC flag to true as well as false.  The system reacted
> the same no matter how I set the hardware clock.
> 
> This is really puzzling.

assuming that you want the hw clock to run local time, then 
edit /etc/sysconfig/clock manually as follows:

ZONE="your timezone" (taken from /usr/share/zoneinfo/, e.g. "US/Central")
UTC=false
ARC=false

reboot after saving the file.

This file (/etc/sysconfig/clock) gets read by rc.sysinit and sets things
up during the boot process. hence a reboot is necessary if you wish to
see what it will do "the next time you reboot".

and, as I recall, timetool does not deal w/ the UTC/ARC settings, so if they
are wrong, they will continue to be wrong. this is from memory from a long
time ago. it is possible that timetool has been either updated or fixed, but
I suspect that this might not be the case.

===

Subject: Re: System clock still not right
From: Gregory Hosler <gregory.hosler@eno.ericsson.se>
Date: Mon, 06 Nov 2000 16:14:12 +0800 (SGT)

On 06-Nov-00 Vidiot wrote:
>>I believe that is by design.  One is supposed to use programs that are
>>smart enough to adjust for localtime when looking at file datestamps.
>>If they wrote the actual localtime to the bits on the hard drive, then
>>when you copy those bits to another computer that is in a different
>>timezone, it would not have the correct time.  But if you copy a file
>>to someone in another timezone, they use their program to adjust the
>>gmt for the correct time.
> 
> OK, that is fine, i.e., setting the actual timestamp of the file to UTC/GMT.
> Then one would expect ls to display the file's timestamp in localtime, which
> it isn't.

is /etc/localtime correct ?

===

Subject: Re: System clock still not right
From: Vidiot <brown@mrvideo.vidiot.com>
Date: Mon, 6 Nov 2000 02:19:41 -0600 (CST)

is /etc/localtime correct ?

It is a copy of /usr/share/zoneinfo/CST6CDT, which is indeed my timezone.

===

Subject: Re: System clock still not right
From: Vidiot <brown@mrvideo.vidiot.com>
Date: Mon, 6 Nov 2000 02:21:52 -0600 (CST)

assuming that you want the hw clock to run local time, then 
>edit /etc/sysconfig/clock manually as follows:
>
>ZONE="your timezone" (taken from /usr/share/zoneinfo/, e.g. "US/Central")
>UTC=false
>ARC=false
>
>reboot after saving the file.

Been there, done that.  It was originally the above and setting the hardware
clock to localtime still created files with UTC.

Someone else has said that this was by design. I can understand the internal
timestamp bits being set to UTC, but would would expect ls to display the
file timestamps in local time, instead of GMT.

===

Subject: Re: System clock still not right
From: "Chris Harvey" <chris@e-harvey.com>
Date: Mon, 6 Nov 2000 08:41:59 -0500

I had the same problem. Turned out I'd been hacked and one of its traits was
file creating had the wrong stamp on it.

===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu