Date() Problem

From: Date: Sat, 27 Jul 2002 09:26:48 +0000
Subject: Date() Problem
Groups: php.general 
Request: Send a blank email to php-general+get-109947@lists.php.net to get a copy of this message
Hi, im making a tab/lyric portal, and for viewing tabs i want to display the time the lyric/tab was submitted. So I retrive it from a MySQL database (as a timestamp) and format it using the date function. The problem is, that the date: 19-01-2038 04:14:07 is allways returned, even though in the date field the timestamp says (as an actual example) 20020723200919. Here is a shortened version of the script: $link = mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($dbname, $link); $get_resource = mysql_query("SELECT artist_id,title,content,user_id,date,type,views FROM resources WHERE id = $id"); $values = mysql_fetch_row($get_resource); <?php $submitdate = date("d-m-Y H:i:s", $values[4]); echo("Submitted on $submitdate"); ?>

« previous php.general (#109947) next »