#44593 [NEW]: strtotime conflicting definitions of 2 digit years
| From: | bernhard at bksys dot at | Date: | Tue, 01 Apr 2008 13:42:44 +0000 |
| Subject: | #44593 [NEW]: strtotime conflicting definitions of 2 digit years | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-648@lists.php.net to get a copy of this message | ||
From: bernhard at bksys dot at
Operating system: any
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: strtotime conflicting definitions of 2 digit years
Description:
------------
http://www.php.net/manual/en/function.strtotime.php
says:
"Note: If the number of the year is specified in a two digit format, the
values between 00-69 are mapped to 2000-2069 and 70-99 to 1970-1999."
This makes 69 2069. 0035 should be the ancient year 35 AD.
"time
The string to parse, according to the GNU » Date Input Formats syntax."
http://www.gnu.org/software/tar/manual/html_node/tar_115.html
says:
-------------------------
72-9-24 # Assume 19xx for 69 through 99,
# 20xx for 00 through 68.
If year is 68 or smaller, then 2000 is added to it; otherwise, if year is
less than 100, then 1900 is added to it.
-------------------------
This makes 69 1969. 0035 is less than 69 so should be converted to 2035.
--
Edit bug report at http://bugs.php.net/?id=44593&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44593&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44593&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44593&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44593&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44593&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44593&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44593&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44593&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44593&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44593&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44593&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44593&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44593&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44593&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44593&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44593&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44593&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44593&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44593&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44593&r=mysqlcfg