in reply to DateTime not observing $ENV{TZ} by default?

The DateTime documentation implies that it respects $ENV{TZ}

No it doesn't. The documentation says

Determining the local time zone for a system can be slow. If $ENV{TZ} is not set, it may involve reading a number of files in /etc or elsewhere. If you know that the local time zone won't change while your code is running, and you need to make many objects for the local time zone, it is strongly recommended that you retrieve the local time zone once and cache it:
our $App::LocalTZ = DateTime::TimeZone->new( name => 'local' ); ... # then everywhere else my $dt = DateTime->new( ..., time_zone => $App::LocalTZ );

So its explicit, use time_zone => 'local'

Replies are listed 'Best First'.
Re^2: DateTime not observing $ENV{TZ} by default?
by Anonymous Monk on Jul 21, 2011 at 01:24 UTC
    Well, I read this sentence:
    If $ENV{TZ} is not set, it may involve reading a number of files in /etc or elsewhere.
    to mean that DateTime checks $ENV{TZ}. Oh well.