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

Re: "appropriate" system time / timezone settings

On Tue, 2004-12-07 at 05:39 +0000, Trevor Smith wrote:
> (You can skip the preamble and just read the last sentence/question if you're 
> short on time.)
> I had thought that the standard way to set up a linux system was to set the 
> system time to the UTC (or Greenwich mean time or whatever) and set the 
> appropriate TZ variable.

Internal timekeeping in Unix systems is based on a simple, but brilliant
observation. Unix keeps time as a interval, not an absolute time. It is
the number of seconds from a fiducial time in the past (which I have
forgotten but could be 00:00 Jan. 1, 1970 UTC). This relieves the system
from having to keep track all the local variances in time of day (e.g.
daylight savings time or time zones, etc.) and guarantees that file
modification times are monotonic over things like daylight savings time
changes. All of the idiosyncrasies  are then put into the code that
converts system time for display to people.

> I just realized that my system is not set like that. Or at least it does not 
> appear to be.
> I was setting up a GPG key on my girlfriend's computer (in the same house) and 
> emailed a bit back and forth. She noted that my messages were coming through 
> to her as being sent 4 hrs earlier than the current time. Then I couldn't 
> import her GPG key because GPG said it was created about 4 hrs in the future 
> (from my system's perspective).
> Now, I realized that my system is in AST, which is -0400 from UTC or Greenwich 
> (which is it anyway?) so that explained that. I set my time clock to be UTC, 
A nice explanation is on: http://aa.usno.navy.mil/faq/docs/UT.html. The
short answer is that there are several UT's differing in the corrections
included and the basis. UTC is a coordination of these. The differences
are of interest only to people worried about extreme precision in
timekeeping. GMT is an old term predating the high precision work, that
remains in use among ordinary time users.
> then selected the Show Timezone->America/Halifax setting from the clock 
> applet in my KDE launchbar but...
> As you'll see from this email, my emails are now being reported as having been 
> sent at 5something am (currently). Indeed, viewing the headers of my emails 
> to myself shows:
> Date: Tue, 7 Dec 2004 05:31:25 +0000
> This should be:
> Date: Tue, 7 Dec 2004 05:31:25 -0400
> or would that be:
> Date: Tue, 7 Dec 2004 01:31:25 -0400
> ?
> Anyway, KMail has no way to set the TZ variable that I can find, and I'm sure 
> it's supposed to be system-wide anyway.
> Any suggestions about where/what I'm missing? Where can I set the TZ variable 
> (or whatever it's called)?

I highly recommend using ntp to keep the local clock on track. I enjoy
knowing that the time displayed on my computer is really accurate - most
of the time within a millisecond of national standards.
Graham Campbell <gc1111 optonline net>

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