note 44718 added to function.date
| From: | cphobeck at longwood dot edu | Date: | Sat, 14 Aug 2004 02:00:17 +0000 |
| Subject: | note 44718 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-74609@lists.php.net to get a copy of this message | ||
I'm trying to use date() to convert a timestamp to local time, but it keeps coming up wrong.
The timestamp is 20040813133632, which should become:
2004 08 13 13:36:32 or August 13, 2004 at 1:36:32 PM.
However, using date() alone: "date("D M d, Y g:i a", $timestamp)" , I get
"Mon Jan 18, 2038 10:14 pm"!
I instead used the function that jenz provided, using the same format string, and I get "Fri
May 15, 2009 8:06 pm"!
I'm running Apache 1.3 and PHP 5. Does anyone have any ideas?
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44718
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44718&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44718&report=yes
Search -- http://master.php.net/manage/user-notes.php