On 19/01/07, Alex Samad <[EMAIL PROTECTED]> wrote:

I thought the file stamps where always recorded as UTC. And the system
would
change the time for the TZ


And you were right - "Timezone" has a meaning only in the context of the
user who wants to read the time.

If a file was changed when the clock in Greenwich (in winter, i.e. non-DST)
showed "2006-Jan-20, 11:51 AM" then this is correct no matter what time zone
you were in.

Or put it in another way - UNIX counts the seconds since it was January 1st,
1970, GMT to record the time (both for transient stuff and in file
timestamps). If your current directory last changed 1169234788 since that
event happened then it doesn't matter WHERE it happened or what's the
current value of TZ or /etc/localtime, "the number of seconds passed between
January 1st, 1970 GMT and the time my current directory was last modified is
1169234788" is a correct statement no matter what timezone you, or your
server, is in. (remember - UNIX used to run on time-sharing systems, where
users could login from different time zones to use remote shells
interactively on the same server, each user would have liked to see "which
file was modified in the last 5 minutes" when typing "ls -lt" in his own
time zone).

"TZ" and /etc/localtime only affect how functions like ctime(3) and date(1)
convert that count of seconds into human form.

And BTW - the command to set the default time zone on Debian is "tzconfig".

Cheers,

--Amos
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to