Monks, please help.

I am trying to convert 3 epoch times to various other timezones and I can't understand why incorrect times are being displayed for Europe/Paris and Europe/Warsaw during winter time. Can you explain this please?

PERL
#!/opt/perl/5.8.0/bin/perl use Time::Local; use strict; my $nowTime = time; my $winTime = timegm (0, 0, 9, 1, 0, 107); my $sumTime = timegm (0, 0, 9, 1, 6, 107); foreach my $e ($nowTime, $winTime, $sumTime) { foreach ("UTC","GB-Eire","Europe/London","CET","Europe/Warsaw","Euro +pe/Paris") { $ENV{TZ} = $_; print scalar localtime($e), " $ENV{TZ}"; print " (DST)" if ((localtime($e))[8]); print "\n"; } print "\n"; }
OUTPUT
Thu Sep 20 19:53:10 2007 UTC Thu Sep 20 20:53:10 2007 GB-Eire (DST) Thu Sep 20 20:53:10 2007 Europe/London (DST) Thu Sep 20 21:53:10 2007 CET (DST) Thu Sep 20 21:53:10 2007 Europe/Warsaw (DST) Thu Sep 20 21:53:10 2007 Europe/Paris (DST) Mon Jan 1 09:00:00 2007 UTC Mon Jan 1 09:00:00 2007 GB-Eire Mon Jan 1 09:00:00 2007 Europe/London Mon Jan 1 10:00:00 2007 CET Mon Jan 1 09:00:00 2007 Europe/Warsaw Mon Jan 1 09:00:00 2007 Europe/Paris Sun Jul 1 09:00:00 2007 UTC Sun Jul 1 10:00:00 2007 GB-Eire (DST) Sun Jul 1 10:00:00 2007 Europe/London (DST) Sun Jul 1 11:00:00 2007 CET (DST) Sun Jul 1 11:00:00 2007 Europe/Warsaw (DST) Sun Jul 1 11:00:00 2007 Europe/Paris (DST)


In reply to $ENV{TZ} and localtime by Amdes

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.