|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-29 07:26 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 24 12:00:02 2025 UTC |
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)