Date/Time
PHP Manual

date_timezone_set

(PHP 5 >= 5.1.0)

date_timezone_set — Sets the time zone for the DateTime object

说明

void date_timezone_set ( DateTime $object , DateTimeZone $timezone )
void DateTime::setTimezone ( DateTimeZone $timezone )

参数

object

DateTime object.

timezone

Desired time zone.

返回值

Returns NULL on success or FALSE on failure.

参见


Date/Time
PHP Manual