Seems Time::Zone was never adjusted in 2011, so it already has the new value.

"msk" => +3*3600, # Moscow

I don't know why you'd ever want to use Time::Zone. In addition to the module's lack of any ability to handle changes, those three letter time zones are not unique.


Note that the latest DateTime::TimeZone (used by DateTime) is already aware of the upcoming changes to Europe/Moscow.

... [ 63436863600, # utc_start 2011-03-26 23:00:00 (Sat) 63549957600, # utc_end 2014-10-25 22:00:00 (Sat) 63436878000, # local_start 2011-03-27 03:00:00 (Sun) 63549972000, # local_end 2014-10-26 02:00:00 (Sun) 14400, 0, 'MSK', ], [ 63549957600, # utc_start 2014-10-25 22:00:00 (Sat) DateTime::TimeZone::INFINITY, # utc_end 63549968400, # local_start 2014-10-26 01:00:00 (Sun) DateTime::TimeZone::INFINITY, # local_end 10800, 0, 'MSK', ],

14400 = 4*3600, 10800 = 3*3600.

use DateTime::Format::RFC3339 qw( ); my $f = DateTime::Format::RFC3339->new(); say $_->set_time_zone('Europe/Moscow')->hms() for $f->parse_datetime('2014-09-01T12:00:00Z'), $f->parse_datetime('2015-09-01T12:00:00Z');
16:00:00 15:00:00

In reply to Re: Moscow time zone change in October 2014 by ikegami
in thread Moscow time zone change in October 2014 by yanshuguang

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.