1--TEST-- 2Test DateTime::getTimezone() function : basic functionality 3--FILE-- 4<?php 5echo "*** Testing DateTime::getTimezone() : basic functionality ***\n"; 6 7date_default_timezone_set("Europe/London"); 8$object = new DateTime("2009-01-30 17:57:32"); 9var_dump( $object->getTimeZone()->getName() ); 10 11 12date_default_timezone_set("America/New_York"); 13$object = new DateTime("2009-01-30 17:57:32"); 14var_dump( $object->getTimeZone()->getName() ); 15 16$la_time = new DateTimeZone("America/Los_Angeles"); 17$object->setTimeZone($la_time); 18var_dump( $object->getTimeZone()->getName() ); 19 20?> 21--EXPECT-- 22*** Testing DateTime::getTimezone() : basic functionality *** 23string(13) "Europe/London" 24string(16) "America/New_York" 25string(19) "America/Los_Angeles" 26