note 44718 rejected from function.date by tomsommer

From: Date: Sat, 14 Aug 2004 02:47:55 +0000
Subject: note 44718 rejected from function.date by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-74610@lists.php.net to get a copy of this message
Note Submitter: cphobeck@longwood.edu ---- 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?

« previous php.notes (#74610) next »