DateTime
PHP 手册

DateTime::setTimestamp

(PHP 5 >= 5.3.0)

DateTime::setTimestampSets the date and time based on an Unix timestamp

说明

public DateTime DateTime::setTimestamp ( int $unixtimestamp )

Sets the date and time based on an Unix timestamp.

参数

unixtimestamp

Unix timestamp representing the date.

返回值

Returns the modified DateTime.

参见


DateTime
PHP 手册