php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67077 Error timezone offset when trying to set the time zone EET
Submitted: 2014-04-15 06:20 UTC Modified: 2016-07-25 09:25 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: dvb2504 at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Date/time related
PHP Version: 5.5.11 OS: Linux
Private report: No CVE-ID: None
 [2014-04-15 06:20 UTC] dvb2504 at gmail dot com
Description:
------------
When trying to set the time zone EET, we got offset +2 but expext +3.
The bug is in all versions since 5.5.10.

http://3v4l.org/0M1S9#v542

Test script:
---------------
<?php
date_default_timezone_set('EET');
$date = new DateTime();
var_dump($date);
$date->setTimezone(new DateTimeZone('EET'));
var_dump($date);

Expected result:
----------------
 object(DateTime)#1 (3) {
  ["date"]=>
  string(19) "2014-04-09 12:23:44"
  ["timezone_type"]=>
  int(3)
  ["timezone"]=>
  string(3) "EET"
}
object(DateTime)#1 (3) {
  ["date"]=>
  string(19) "2014-04-09 12:23:44"
  ["timezone_type"]=>
  int(3)
  ["timezone"]=>
  string(3) "EET"
}

Actual result:
--------------
 object(DateTime)#1 (3) {
  ["date"]=>
  string(19) "2014-04-09 12:23:44"
  ["timezone_type"]=>
  int(3)
  ["timezone"]=>
  string(3) "EET"
}
object(DateTime)#1 (3) {
  ["date"]=>
  string(19) "2014-04-09 11:23:44"
  ["timezone_type"]=>
  int(2)
  ["timezone"]=>
  string(3) "EET"
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-09 14:01 UTC] mtymek at gmail dot com
I have a similar issue when setting "CEST" as a timezone. As of PHP v5.5.10, setting timezone to CEST will result in different timestamp stored internally. Possibly it is the same issue.

See https://3v4l.org/kuXoW
 [2016-06-29 12:12 UTC] cmb@php.net
Apparently, all other timezones and timezone abbreviations are
affected. Maybe a documentation issue only?
 [2016-06-29 13:42 UTC] derick@php.net
-Package: Date/time related +Package: Documentation problem
 [2016-06-29 13:42 UTC] derick@php.net
EET is not a timezone but an abbreviation. These are nit unique. This is indeed not a bug but a documentation issue.
 [2016-07-03 19:40 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2016-07-25 09:18 UTC] cmb@php.net
-Type: Bug +Type: Documentation Problem -Package: Documentation problem +Package: Date/time related
 [2016-07-25 09:25 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=339712
Log: Fix #67077: Error timezone offset when trying to set the time zone EET
 [2016-07-25 09:25 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2016-07-25 09:25 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:07 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=10d150e8a969d3542cb3a627f85971c4e102b881
Log: Fix #67077: Error timezone offset when trying to set the time zone EET
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC