array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), '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); ?>

DateTime::setTimestamp

date_timestamp_set

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

DateTime::setTimestamp -- date_timestamp_setSets the date and time based on an Unix timestamp

Açıklama

Nesne yönelimli kullanım

public DateTime::setTimestamp(int $timestamp): DateTime

Yordamsal kullanım

date_timestamp_set(DateTime $object, int $timestamp): DateTime

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.

Bağımsız Değişkenler

nesne

Sadece yordamsal tarz: date_create() tarafından bir DateTime nesnesi döndürülür. İşlev bu nesnede değişiklik yapar.

timestamp

Unix timestamp representing the date. Setting timestamps outside the range of int is possible by using DateTimeImmutable::modify() with the @ format.

Dönen Değerler

Yöntem zincirleme için değişmiş DateTime nesnesi döner.

Ayrıca Bakınız