From: mehmety at gmail dot com Operating system: Linux PHP version: 5.2.0 PHP Bug Type: Date/time related Bug description: date conversion failure
Description: ------------ In order to reproduce this bug, see the below source. Using date and string to time ultimately causes the time to be reset for the year. Seems like deviant behavior. Reproduce code: --------------- php -r 'for($x=0;$x<99;$x++){ $year=date("Y",strtotime("+$x years"));echo "$x $year\n"; } exit();' Expected result: ---------------- {0...98}{today's year + {0...98} } Actual result: -------------- 0 2006 1 2007 2 2008 3 2009 4 2010 5 2011 6 2012 7 2013 8 2014 9 2015 10 2016 11 2017 12 2018 13 2019 14 2020 15 2021 16 2022 17 2023 18 2024 19 2025 20 2026 21 2027 22 2028 23 2029 24 2030 25 2031 26 2032 27 2033 28 2034 29 2035 30 2036 31 2037 32 1969 33 1969 34 1969 35 1969 36 1969 37 1969 38 1969 39 1969 40 1969 41 1969 42 1969 43 1969 44 1969 45 1969 46 1969 47 1969 48 1969 49 1969 50 1969 51 1969 52 1969 53 1969 54 1969 55 1969 56 1969 57 1969 58 1969 59 1969 60 1969 61 1969 62 1969 63 1969 64 1969 65 1969 66 1969 67 1969 68 1969 69 1969 70 1969 71 1969 72 1969 73 1969 74 1969 75 1969 76 1969 77 1969 78 1969 79 1969 80 1969 81 1969 82 1969 83 1969 84 1969 85 1969 86 1969 87 1969 88 1969 89 1969 90 1969 91 1969 92 1969 93 1969 94 1969 95 1969 96 1969 97 1969 98 1969 -- Edit bug report at http://bugs.php.net/?id=39668&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39668&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39668&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39668&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39668&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39668&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39668&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39668&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39668&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39668&r=support Expected behavior: http://bugs.php.net/fix.php?id=39668&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39668&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39668&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39668&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39668&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39668&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39668&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39668&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39668&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39668&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39668&r=mysqlcfg