|  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
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
PHP's DateTimeZone doesn't currently support the FET (Far Eastern European Time) timezone, which is a valid timezone since 2011 according to IANA:

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:

$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


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-03 11:43 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: derick
 [2015-01-20 19:12 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 07:01:29 2024 UTC