Problems reformatting Unix timestamp with strftime

From: Date: Fri, 16 Feb 2001 00:04:01 +0000
Subject: Problems reformatting Unix timestamp with strftime
Groups: php.general 
Request: Send a blank email to php-general+get-40004@lists.php.net to get a copy of this message
I've checked this in the PHP documentation and done a scan of the archive to try to work out where I am going wrong but have failed. I know I could fix this problem by using substrings and processing them, but PHP has a simpler function which should work. Shouldn't it? In my database a record has a timestamp of: 20010213173654 I extract the timestamp with a select statement, and process it with: strftime("%A, %e %B %Y", $lastmodified) (where lastmodified is the variable containing the timestamp) and it produces the output: Monday, 18 January 2038 Does anyone know why PHP isn't interpreting the timestamp correctly? I can't work out how it could misinterpret the timestamp like this... Thanks for any help! -- Steven "Sponges grow in the ocean... that *kills* me. I wonder how much deeper they'd be if that didn't happen." - Steven Wright

« previous php.general (#40004) next »