note 81021 deleted from function.time by philip
| From: | philip@php.net | Date: | Sun, 25 May 2008 06:42:18 +0000 |
| Subject: | note 81021 deleted from function.time by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-139721@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
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