DateTime::setTimestamp

PHP 5 >= 5.3.0, PHP 7, PHP 8
DateTime::setTimestamp - Sets the date and time based on an Unix timestamp
Manual
Code Examples

Example #1 DateTime::setTimestamp example

Result: 1272508903 = 2010-04-28 22:41:43 1171502725 = 2007-02-14 20:25:25
PHP Version:


Function DateTime::setTimestamp:

Date and Time Functions

Most used PHP functions