php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67559 Incorrect timezone MSK
Submitted: 2014-07-03 10:12 UTC Modified: 2017-03-19 11:36 UTC
Votes:2
Avg. Score:2.5 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: sabo at devpreview dot ru Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.4.30 OS: Debian Wheezy 7.5
Private report: No CVE-ID: None
 [2014-07-03 10:12 UTC] sabo at devpreview dot ru
Description:
------------
Incorrect time offset for MSK timezone.

Test script:
---------------
$d = new DateTime('2014-07-03T14:03:25', new DateTimeZone('MSK'));
echo $d->format(DateTime::W3C) . PHP_EOL;
// Output: 2014-07-03T14:03:25+04:00

$d = DateTime::createFromFormat('Y-m-d\TH:i:s T', '2014-07-03T14:03:25 MSK');
echo $d->format(DateTime::W3C) . PHP_EOL;
// Output: 2014-07-03T14:03:25+03:00

Expected result:
----------------
2014-07-03T14:03:25+04:00
2014-07-03T14:03:25+04:00

Actual result:
--------------
2014-07-03T14:03:25+04:00
2014-07-03T14:03:25+03:00

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-19 11:36 UTC] heiglandreas@php.net
-Status: Open +Status: Not a bug
 [2017-03-19 11:36 UTC] heiglandreas@php.net
According to https://github.com/eggert/tz/blob/c040ac6cb98d8c564a67e37468512d3e0447080b/europe#L796 the offset is +03:00 for MSK.

And according to https://3v4l.org/UL7bR that's what the output for both inputs are.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC