Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP date_timestamp_set() Function

PHP date_timestamp_set() Function

PHP Date/Time PHP Date/Time Reference Manual

Example

Set the date and time based on a Unix timestamp:

Run Example »


Definition and Usage

The date_timestamp_set() function sets the date and time based on a Unix timestamp.

Syntax

date_timestamp_set(

object,unixtimestamp);

Parameters Description
object Required. Specifies a DateTime object returned by date_create() The DateTime object returned. This function modifies that object.
unixtimestamp Required. Specifies the Unix timestamp representing the date.

Technical Details

Return Value: Returns a DateTime object in the specified format, or FALSE on failure.
PHP Version: 5.3+

PHP Date/Time PHP Date/Time Reference Manual