Using time zone UTC-5 (or GMT-5, or EST5)

Rick Stevens ricks at alldigital.com
Wed Apr 24 21:28:26 UTC 2013


On 04/24/2013 12:01 PM, Bill Davidsen issued this missive:
> Rick Stevens wrote:
>> On 04/23/2013 03:31 PM, Bill Davidsen issued this missive:
>>> I am getting some data on mountable media, and the device which writes
>>> the files runs in EST or whatever you want to call five hours west of
>>> Greenwich with no daylight time. The problem is that on a FAT or
>>> ISO-9660 filesystem, the date and time seem to all jump an hour during
>>> daylight time. Is there a better way to get the time correct than to run
>>> a separate system which doesn't use daylight savings?
>>>
>>> I have tried exporting TZ=EST5 (or EST or UTC-5 or GMT-5) to the mount
>>> command or the rsync command, that doesn't seem to help anything, I need
>>> the incoming data treated as EST, while the machine is at EST5EDT.
>>
>> Hopefully you have the "System clock uses UTC" set on your Linux system.
>> If so, then all internal timestamps use UTC. They are converted to local
>> time when displayed (via "ls" or whatever). Winblows boxes don't do
>> that...they use the local time as the timestamp mechanism, so there's
>> the rub (also the cause of many issues with dual-booting machines).
>>
>> You can either set your Linux box to not use UTC as the system clock
>> (I don't like that) or just deal with the idiocy that is Windows. It's
>> your system and your call.
>
> No Windows involved, just some data logging machinery which writes info
> in VFAT or ISO-9660 formats depending on the nmodel.

That equipment probably still uses localtime (if it's DOS- or
CP/M-based). I just used Windows as an example as it is known to cause
this sort of problem.

> But no daylight
> changes on the big boxes, I just have to make the data be local time for
> reports and comparison. The simple way is to run EST on the system which
> reads to data into Linux. Linux is a tad too smart here.

Actually, using UTC as the core gives all systems a consistent view of
the current time, regardless of where they're located. The Unix epoch
time is 00:00:00 1 January 1970 UTC after all.

Converting this UTC time to local when displayed is a convenience for
us humans.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks at alldigital.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-   To understand recursion, you must first understand recursion.    -
----------------------------------------------------------------------


More information about the users mailing list