Re: timezone anomalies

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: frantisek holop <minusf@...>
Cc: <misc@...>
Date: Wednesday, May 28, 2008 - 7:12 am

On Wed, 28 May 2008, frantisek holop wrote:

> hmm, on Mon, May 26, 2008 at 01:24:24AM -0400, Woodchuck said that

Hi Frantisek,

you really see the "correct date". The time-zone is a part of the date.
Let's say 8:30 am CEST and 8:30 am EST are completely different moments,
while "Wed May 28 13:04:16 CEST 2008" (UTC+2) is the same moment as "Wed
May 28 07:04:16 EDT 2008" (UTC-4). It is somewhat relativistic, very
similar to mathematic transforms. Or it is even like in finance, USD 100
today and USD 100 two years later are different money, because of
interests (not taking inflation into consideration).

It all depends on your point of view; if you are looking at your files
from Europe, use TZ=Europe/Zurich (CEST, UTC+1 + DST or whatever), if you
are looking at those very same files from Thailand, set your TZ to
Asia/Bangkok (or UTC+7 or whatever). If you want to see what the
timestamps looked like when you were in Thailand, modify your TZ
temporarily.

Some other OS's (namely Linux) always use timestamps on msdos and cd9660
filesystems, as if they were in localtime (not in UTC as in case of
OpenBSD), which is frequently more practical when working with media from
dos, windows, os/2 and similar people or when working with data from
peripherals like cameras. But this feature can be very misleading if you
are not prepared for it -- you can only learn it by trial and error, I
have never seen it documented anywhere when I needed it. In addition to
that, utilities like mkisofs when creating filesystem images use the
timestamps as reported by localtime() (or what it uses). When you mount it
afterwards, you get different timestamps than you had before.

NetBSD's mount_msdos has an option -t for situations, when you need to
load data from msdos filesystems containg timestamps in local time (which
is usually true).
http://netbsd.gw.com/cgi-bin/man-cgi?mount_msdos++NetBSD-current
It won't solve your issue (which actually is not an issue, really), but I
consider it a very handy feature.

Regards,
David

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
timezone anomalies, frantisek holop, (Thu May 22, 7:34 am)
Re: timezone anomalies, frantisek holop, (Fri May 23, 3:25 am)
Re: timezone anomalies, Woodchuck, (Fri May 23, 11:56 pm)
Re: timezone anomalies, frantisek holop, (Sun May 25, 6:41 am)
Re: timezone anomalies, Woodchuck, (Mon May 26, 1:24 am)
Re: timezone anomalies, frantisek holop, (Wed May 28, 5:50 am)
Re: timezone anomalies, David Vasek, (Wed May 28, 7:12 am)
Re: timezone anomalies, Ted Unangst, (Sun May 25, 10:25 pm)
Re: timezone anomalies, frantisek holop, (Thu May 22, 8:23 am)
Re: timezone anomalies, Kevin Wilcox, (Thu May 22, 9:06 am)
Re: timezone anomalies, Paul de Weerd, (Thu May 22, 8:40 am)
Re: timezone anomalies, Wade, Daniel, (Thu May 22, 9:22 am)