1--TEST-- 2Test date_timezone_get() function : basic functionality 3--FILE-- 4<?php 5/* Prototype : DateTimeZone date_timezone_get ( DateTime $object ) 6 * Description: Return time zone relative to given DateTime 7 * Source code: ext/date/php_date.c 8 * Alias to functions: DateTime::setTimezone 9 */ 10 11echo "*** Testing date_timezone_get() : basic functionality ***\n"; 12 13date_default_timezone_set("Europe/London"); 14$object = date_create("2009-01-30 17:57:32"); 15$tz = date_timezone_get($object); 16var_dump( timezone_name_get($tz) ); 17 18date_default_timezone_set("America/New_York"); 19$object = date_create("2009-01-30 17:57:32"); 20$tz = date_timezone_get($object); 21var_dump( timezone_name_get($tz) ); 22 23$la_time = timezone_open("America/Los_Angeles"); 24date_timezone_set($object, $la_time); 25$tz = date_timezone_get($object); 26var_dump( timezone_name_get($tz) ); 27 28?> 29===DONE=== 30--EXPECTF-- 31*** Testing date_timezone_get() : basic functionality *** 32string(13) "Europe/London" 33string(16) "America/New_York" 34string(19) "America/Los_Angeles" 35===DONE=== 36