Bug #65995 [NEW]: FET timezone is missing in DateTimeZone
| From: | szahariev at sevone dot com | Date: | Tue, 29 Oct 2013 14:22:19 +0000 |
| Subject: | Bug #65995 [NEW]: FET timezone is missing in DateTimeZone | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-182475@lists.php.net to get a copy of this message | ||
From: szahariev at sevone dot com
Operating system:
PHP version: 5.4.21
Package: Date/time related
Bug Type: Bug
Bug description:FET timezone is missing in DateTimeZone
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 bug report at https://bugs.php.net/bug.php?id=65995&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65995&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=65995&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65995&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65995&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65995&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65995&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65995&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65995&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65995&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65995&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65995&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65995&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65995&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65995&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65995&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65995&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65995&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65995&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65995&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65995&r=mysqlcfg