Bug #65995 [Opn->Asn]: FET timezone is missing in DateTimeZone
Edit report at https://bugs.php.net/bug.php?id=65995&edit=1
ID: 65995
Updated by: felipe@php.net
Reported by: szahariev at sevone dot com
Summary: FET timezone is missing in DateTimeZone
-Status: Open
+Status: Assigned
Type: Bug
Package: Date/time related
PHP Version: 5.4.21
-Assigned To:
+Assigned To: derick
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2013-10-29 14:22:18] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65995&edit=1
Thread (3 messages)