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
 [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-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 08 00:05:48 2023 UTC