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