| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
use Test::More tests => 2; |
| 4 |
use Date::Parse qw(str2time); |
| 5 |
use Time::Zone; |
| 6 |
|
| 7 |
# RT#81350: MSK (Moscow Standard Time) offset |
| 8 |
# Russia was UTC+4 in 2011-2014 (permanent DST), but reverted to UTC+3 in October 2014. |
| 9 |
# The correct current offset is UTC+3 = 10800 seconds. |
| 10 |
{ |
| 11 |
my $offset = tz_offset("MSK"); |
| 12 |
is($offset, 10800, "RT#81350: tz_offset('MSK') returns 10800 (UTC+3)"); |
| 13 |
|
| 14 |
my $time = str2time("2024-01-15 12:00:00 MSK"); |
| 15 |
my $time_utc = str2time("2024-01-15 09:00:00 UTC"); |
| 16 |
is($time, $time_utc, "RT#81350: MSK date parses to correct UTC equivalent"); |
| 17 |
} |