php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65995 FET timezone is missing in DateTimeZone
Submitted: 2013-10-29 14:22 UTC Modified: 2015-01-20 19:12 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: szahariev at sevone dot com Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.4.21 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: szahariev at sevone dot com
New email:
PHP Version: OS:

 

 [2013-10-29 14:22 UTC] szahariev at sevone dot com
Description:
------------
PHP's DateTimeZone doesn't currently support the FET (Far Eastern European Time) timezone, which is a valid timezone since 2011 according to IANA: http://www.iana.org/time-zones/repository/releases/tzdata2013h.tar.gz

The only two major cities in there are Europe/Kaliningrad and Europe/Minsk. Even if PHP refuses to support it, it shouldn't output FET, when format "T" is used for timezone Europe/Kaliningrad.


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

$dateTimeZone = new DateTimeZone('Europe/Kaliningrad');
$dateTime = new DateTime('now', $dateTimeZone);
// will fail here, because FET timezone doesn't exist yet
new DateTimeZone($dateTime->format("T"));


Expected result:
----------------
No exception thrown from PHP.

Actual result:
--------------
PHP Fatal error:  Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (FET)' in /home/sofit/Downloads/php-5.4.21/test.php:5
Stack trace:
#0 /home/sofit/Downloads/php-5.4.21/test.php(5): DateTimeZone->__construct('FET')
#1 {main}
  thrown in /home/sofit/Downloads/php-5.4.21/test.php on line 5


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-03 11:43 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: derick
 [2015-01-20 19:12 UTC] derick@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 08:01:28 2024 UTC