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

Help with timezones (values of TZ) and summer (daylight savings) time.



I'm working on a script to record some radio shows broadcast on the
east coast of the USA and I want the filenames to contain the local
time when the recording started.  The script worked fine during the
winter:

   TIMESTAMP=`TZ=EST date +%Y%m%d-%H%M-%Z`

but I wanted to modify it for the summer.  I thought the code for east
coast daylight savings time was EDT, but that comes out wrong:

$ date
Tue Apr 11 14:49:19 BST 2006

$ TZ=EST date
Tue Apr 11 08:49:21 EST 2006

$ TZ=EDT date
Tue Apr 11 13:49:24 EDT 2006


What is the TZ code for eastern daylight savings time, and where can I
get a definite list of the abbreviations?

How can I get my script to determine automatically whether standard or
summer time applies?  (My computer automatically changes to summer
time for the UK, so I must have some relevant software that I don't
know how to find.)

-- 
Thanks,
Adam



Reply to: