note 73601 added to function.strtotime

From: Date: Fri, 02 Mar 2007 23:29:56 +0000
Subject: note 73601 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-124032@lists.php.net to get a copy of this message
SQL datetime columns have a much wider range of allowed values than a UNIX timestamp, and therefore this function is not safe to use to convert a SQL datetime column to something usable in PHP4. Year 9999 is the limit for MySQL, which obviously exceeds the UNIX timestamp's capacity for storage. Also, dates before 1970 will cause the function to fail (at least in PHP4, don't know about 5+), so for example my boss' birthday of 1969-08-11 returned FALSE from this function. ---- Server IP: 69.147.83.197 Probable Submitter: 70.43.179.174 ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- https://master.php.net/note/edit/73601 Del: integrated -- https://master.php.net/note/delete/73601/integrated Del: useless -- https://master.php.net/note/delete/73601/useless Del: bad code -- https://master.php.net/note/delete/73601/bad+code Del: spam -- https://master.php.net/note/delete/73601/spam Del: non-english -- https://master.php.net/note/delete/73601/non-english Del: in docs -- https://master.php.net/note/delete/73601/in+docs Del: other reasons-- https://master.php.net/note/delete/73601 Reject -- https://master.php.net/note/reject/73601 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124032) next »