[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sheflug] Help with timezones (values of TZ) and summer (daylightsavings) 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 with the following line:
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 doesn't work:
$ date
Tue Apr 18 14:07:18 BST 2006
$ TZ=EST date
Tue Apr 18 08:07:22 EST 2006
$ TZ=EDT date
Tue Apr 18 13:07:26 EDT 2006
What is the TZ code for eastern daylight savings time, and where can I
get a definitive 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 in the UK, so I think it has some relevant software that I don't
know how to find or use.)
--
Thanks,
Adam
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.