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

Hi choroba, thank you for your response. I tried your code and don't seem to get the conversion to UTC when say executes. I get "2015-10-27 11:50:45.242" not "2015-10-27 15:50:45.242" that I expect, I'm not sure if this is because the code is running on a machine where local timezone is EDT / NewYork or if somehow I've botched your example. Any thoughts?

Replies are listed 'Best First'.
Re^4: Timezone Conversion
by choroba (Cardinal) on Oct 29, 2015 at 13:39 UTC
    What OS, what Perl version? It works for me (both Linux and cygwin, 5.18 / 5.22). Also, check the versions of the used modules.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      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

        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.

        .