php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68434 wrong timezones for Russia
Submitted: 2014-11-17 11:43 UTC Modified: 2014-11-17 23:31 UTC
Votes:26
Avg. Score:4.8 ± 0.5
Reproduced:23 of 24 (95.8%)
Same Version:23 (100.0%)
Same OS:20 (87.0%)
From: reaper at lmn dot name Assigned: ab (profile)
Status: Closed Package: Date/time related
PHP Version: 5.6.3 OS: win32
Private report: No CVE-ID: None
 [2014-11-17 11:43 UTC] reaper at lmn dot name
Description:
------------
Timezones in php do not reflect the changes in russian timezones occured on 26th of October. For example, Moscow is now UTC+3 while php still thinks it's UTC+4, Yekaterinburg should be UTC+5 instead of UTC+6 and so on.

Test script:
---------------
<?php

$formatter = IntlDateFormatter::create(NULL, NULL, NULL, "Europe/Moscow");
print_r($formatter->getTimeZone());
$formatter = IntlDateFormatter::create(NULL, NULL, NULL, "Etc/GMT-3");
print_r($formatter->getTimeZone());
?>

Expected result:
----------------
IntlTimeZone Object
(
    [valid] => 1
    [id] => Europe/Moscow
    [rawOffset] => 10800000
    [currentOffset] => 10800000
)
IntlTimeZone Object
(
    [valid] => 1
    [id] => Etc/GMT-3
    [rawOffset] => 10800000
    [currentOffset] => 10800000
)


Actual result:
--------------
IntlTimeZone Object
(
    [valid] => 1
    [id] => Europe/Moscow
    [rawOffset] => 14400000
    [currentOffset] => 14400000
)
IntlTimeZone Object
(
    [valid] => 1
    [id] => Etc/GMT-3
    [rawOffset] => 10800000
    [currentOffset] => 10800000
)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-17 13:39 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2014-11-17 13:39 UTC] ab@php.net
Please try the latest http://pecl.php.net/package/timezonedb (just load the dll).

Thanks
 [2014-11-17 13:40 UTC] ab@php.net
Ah, nevermind ... that's not datetime but intl.
 [2014-11-17 17:42 UTC] ab@php.net
I've rebuilt the data DLLs with the updated TZ http://windows.php.net/downloads/snaps/ostc/68434/icu_tz_update/2014j/ . Please try one, whether it fixes the TZ issue and doesn't break anything else. This is probably the only solution as long as we don't upgrade ICU.

Thanks.
 [2014-11-17 18:54 UTC] reaper at lmn dot name
Yes, new icu dll helped and result is as expected.
 [2014-11-17 23:31 UTC] ab@php.net
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: ab
 [2014-11-17 23:31 UTC] ab@php.net
Thanks for the update. The data at least should be updated in the next release.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 11:01:31 2024 UTC