array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'datetime.settimestamp.php', 1 => 'DateTime::setTimestamp', 2 => 'Sets the date and time based on an Unix timestamp', ), 'up' => array ( 0 => 'class.datetime.php', 1 => 'DateTime', ), 'prev' => array ( 0 => 'datetime.settime.php', 1 => 'DateTime::setTime', ), 'next' => array ( 0 => 'datetime.settimezone.php', 1 => 'DateTime::setTimezone', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/datetime/datetime/settimestamp.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 5 >= 5.3.0, PHP 7, PHP 8)
DateTime::setTimestamp -- date_timestamp_set — Sets the date and time based on an Unix timestamp
Об'єктно-орієнтований стиль
Процедурний стиль
Sets the date and time based on an Unix timestamp.
Like DateTimeImmutable::setTimestamp() but works with DateTime.
The procedural version takes the DateTime object as its first argument.
objectТільки процедурний стиль: об'єкт DateTime повертається функцією date_create(). Вона змінює цей об'єкт.
timestamp
Unix timestamp representing the date.
Setting timestamps outside the range of int is possible by using
DateTimeImmutable::modify() with the @ format.
Повертає змінений об'єкт DateTime для ланцюжків методів.