note 98834 added to function.strtotime

From: Date: Fri, 09 Jul 2010 19:42:38 +0000
Subject: note 98834 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-170850@lists.php.net to get a copy of this message
Be careful when parsing years. If you pass a 4-digit number to strtotime, it will first try to interpret it as a time of day. If it's an invalid time of day, it will interpret it as a year. For example: "0" through "999" => Unix epoch "1000" => Today, 10:00:00 "1959" => Today, 19:59:00 "1960" => Today's month, day, and time in the year 1960 Tested on PHP 5.2.10 ---- Server IP: 69.147.83.197 Probable Submitter: 140.182.211.141 ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- https://master.php.net/note/edit/98834 Del: integrated -- https://master.php.net/note/delete/98834/integrated Del: useless -- https://master.php.net/note/delete/98834/useless Del: bad code -- https://master.php.net/note/delete/98834/bad+code Del: spam -- https://master.php.net/note/delete/98834/spam Del: non-english -- https://master.php.net/note/delete/98834/non-english Del: in docs -- https://master.php.net/note/delete/98834/in+docs Del: other reasons-- https://master.php.net/note/delete/98834 Reject -- https://master.php.net/note/reject/98834 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170850) next »