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'
In reply to Re: DateTime not observing $ENV{TZ} by default?
by Anonymous Monk
in thread DateTime not observing $ENV{TZ} by default?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |