#43959 [Opn->Bgs]: DateTimeZone gets exception with HST10HDT timezone
| From: | derick@php.net | Date: | Tue, 29 Jan 2008 07:26:10 +0000 |
| Subject: | #43959 [Opn->Bgs]: DateTimeZone gets exception with HST10HDT timezone | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121700@lists.php.net to get a copy of this message | ||
ID: 43959
Updated by: derick@php.net
Reported By: hughmcl at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
Operating System: CentOS 5.1
PHP Version: 5.2.5
New Comment:
HST10HDT is not a valid zone, thus you get an error here. A list of
valid zones is at http://php.net/timezones
Previous Comments:
------------------------------------------------------------------------
[2008-01-29 04:14:16] hughmcl at hotmail dot com
Description:
------------
We were using part of the code below to work out time zone differences,
however when HST10HDT was entered it was giving an exception, even
although it's a valid timezone.
Reproduce code:
---------------
<?
try {
#DateTimeZone Object for TimeZone for this phone
$tz = 'HST10HDT';
$cdto = new DateTimeZone($tz);
} catch(Exception $e) {
print "Exception!\n";
print " ---> ".$e->getMessage()."\n";
exit;
}
print "No Exception!\n";
?>
Expected result:
----------------
No Exception!
Actual result:
--------------
Exception!
---> DateTimeZone::__construct(): Unknown or bad timezone (HST10HDT)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43959&edit=1