ID: 43959 Updated by: [EMAIL PROTECTED] 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
