note 81021 added to function.time
| From: | Anonymous at osu1 dot php dot net | Date: | Mon, 11 Feb 2008 14:37:47 +0000 |
| Subject: | note 81021 added to function.time | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136039@lists.php.net to get a copy of this message | ||
Hi Tom Guilleaume,
I hope your way to convert from timestamp to readable date didn't take as long as it looks like
it did...
Firstly, it gives incorrect dates.
echo reverse_unix_timestamp(1201212000,long);
gives "January 23 2008 10:: pm" (should be Jan 24th).
Secondly, you can replace the whole of your function with the ready to use PHP 'date'
function like this:
echo date('F d Y h:i:s A',1201212000); // January 24 2008 10:00:00 PM
----
Server IP: 87.124.64.96
Probable Submitter: 80.42.30.146
----
Manual Page -- http://www.php.net/manual/en/function.time.php
Edit -- https://master.php.net/note/edit/81021
Del: integrated -- https://master.php.net/note/delete/81021/integrated
Del: useless -- https://master.php.net/note/delete/81021/useless
Del: bad code -- https://master.php.net/note/delete/81021/bad+code
Del: spam -- https://master.php.net/note/delete/81021/spam
Del: non-english -- https://master.php.net/note/delete/81021/non-english
Del: in docs -- https://master.php.net/note/delete/81021/in+docs
Del: other reasons-- https://master.php.net/note/delete/81021
Reject -- https://master.php.net/note/reject/81021
Search -- https://master.php.net/manage/user-notes.php