in reply to Re^4: Timezone Conversion
in thread Timezone Conversion

CentOS release 6.6 (Final) Module Version CPAN 1.9800 Log::Log4perl 1.38 Perl 5.10.1 PerlIO::via::MD5 0.07 Term::ReadKey 2.30 Time::Format 1.11 Time::ParseDate 2013.1113 Time::Piece 1.31

Replies are listed 'Best First'.
Re^6: Timezone Conversion
by mhooper (Novice) on Oct 29, 2015 at 15:50 UTC

    Adding $ENV{TZ} = 'Etc/UTC'; at beginning of code seems to correct but noting that is resetting the timezone for the whole process not just the the one conversion. All log times etc post that change are in UTC not EDT as required.

    .
      Adding $ENV{TZ} = 'Etc/UTC'; at beginning of code seems to correct …
      What about not adding, but changing the line
      local $ENV{TZ} = 'UTC';
      to
      local $ENV{TZ} = 'Etc/UTC';
      instead?