note 126836 added to datetimeimmutable.settimestamp
| From: | Jaman at main dot php dot net | Date: | Wed, 09 Feb 2022 07:54:52 +0000 |
| Subject: | note 126836 added to datetimeimmutable.settimestamp | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217589@lists.php.net to get a copy of this message | ||
Simple way to create object from timestamp:
<?php
$date = DateTimeImmutable::createFromFormat('U', 1644390600, new
DateTimeZone('Europe/Kiev'));
echo $date->format('d.m.Y H:i:s'); //09.02.2022 07:10:00
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.135 (proxied: 91.241.220.153)
----
Manual Page -- https://php.net/manual/en/datetimeimmutable.settimestamp.php
Edit -- https://main.php.net/note/edit/126836
Del: integrated -- https://main.php.net/note/delete/126836/integrated
Del: useless -- https://main.php.net/note/delete/126836/useless
Del: bad code -- https://main.php.net/note/delete/126836/bad+code
Del: spam -- https://main.php.net/note/delete/126836/spam
Del: non-english -- https://main.php.net/note/delete/126836/non-english
Del: in docs -- https://main.php.net/note/delete/126836/in+docs
Del: other reasons-- https://main.php.net/note/delete/126836
Reject -- https://main.php.net/note/reject/126836
Search -- https://main.php.net/manage/user-notes.php