您的位置:寻梦网首页编程乐园PHP 编程PHP5中文手册
PHP5中文手册

date_create

(PHP 5 >= 5.1.0)

date_create — Returns new DateTime object

说明

DateTime date_create ([ string $time [, DateTimeZone $timezone ]] )
DateTime DateTime::__construct ([ string $time [, DateTimeZone $timezone ]] )

参数

time

String in a format accepted by strtotime(), defaults to "now".

timezone

Time zone of the time.

返回值

Returns DateTime object on success or FALSE on failure.