note 98834 deleted from function.strtotime by derick

From: Date: Sun, 03 Nov 2013 15:20:57 +0000
Subject: note 98834 deleted from function.strtotime by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197407@lists.php.net to get a copy of this message
Note Submitter: erjiang at indiana dot edu ---- 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

« previous php.notes (#197407) next »