Re: get timezone in a script?



Igmar Palsenberg wrote:
Michael Tosch wrote:

In Solaris and HPUX it is environment variable TZ.
In Linux TZ exists, but is often not set.
There is a binary file /etc/localtime,
but how to get the timezone string out of it?


$s = `date +%Z` should do it.


Igmar



You are a genius - thanks!

--
Michael Tosch @ hp : com
.