Perl question

Kevin Buettner plug-devel@lists.PLUG.phoenix.az.us
Mon May 21 21:21:02 2001


On May 22,  9:51pm, yarddog wrote:

> On Tuesday 22 May 2001 09:45 pm, Victor Odhner wrote about Re: Perl 
> question:
> 
>  I don't know what US/Eastern is, but EST does not
> > adjust for daylight savings.
> 
> EDT

It'd be nice if this worked, but it doesn't.  On my Red Hat 7 machine,
any of the following will give provide you with EDT:

    America/New_York
    EST5EDT
    US/Eastern
    posix/America/New_York
    posix/EST5EDT
    posix/US/Eastern

(There are some others that will likely work too, but which have different
checksums than the above files in /usr/share/zoneinfo.)

BTW, if you try to use "EDT" (or any other unrecognized timezone) in
a perl script...

    perl -e '$ENV{TZ}="EDT"; print scalar(localtime(time)), "\n"'

...you'll end up getting GMT.  (Though I wouldn't count on this
behavior.)

Kevin