in reply to $ENV{TZ} and localtime

Perl is here at the mercy of your system's timezone definitions. Probably those are b0rken.

What system are you on?

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: $ENV{TZ} and localtime
by Amdes (Initiate) on Sep 20, 2007 at 21:57 UTC
    I'm using Solaris 8 on Sun hardware.
      Thanks for your advice. I listed the contents of the /usr/share/lib/zoneinfo directory and found no subdirectory called Europe. I am therefore assuming that the system must default to a specified timezone if the given timezone is unrecognised.

      Thanks for your help.

        Yes, it defaults to GMT for missing timezones (at least that's what the docs say — the DST offset is apparently being applied separately).

        BTW, you can probably generate the timezone files yourself. The sources are normally distributed in /usr/share/lib/zoneinfo/src. For some reason, the european zones are usually not compiled/installed automatically. So, just issue "zic /usr/share/lib/zoneinfo/src/europe" to compile them. Unless told otherwise (-d), this command will install directly into the default /usr/share/lib/zoneinfo, so you'll of course need root privileges.