1--TEST-- 2Test date_timezone_set() function : basic functionality 3--FILE-- 4<?php 5echo "*** Testing date_timezone_set() : basic functionality ***\n"; 6 7//Set the default time zone 8date_default_timezone_set("Europe/London"); 9 10$datetime = date_create("2009-01-30 17:57:32"); 11$tz = date_timezone_get($datetime); 12echo "Default timezone: " . timezone_name_get($tz) . "\n"; 13 14$datetime = date_create("2009-01-30 22:57:32"); 15$la_time = timezone_open("America/Los_Angeles"); 16 17date_timezone_set($datetime, $la_time); 18$tz = date_timezone_get($datetime); 19echo "New timezone: " . timezone_name_get($tz) . "\n"; 20 21?> 22--EXPECT-- 23*** Testing date_timezone_set() : basic functionality *** 24Default timezone: Europe/London 25New timezone: America/Los_Angeles 26