Bug #79006 [NEW]: Function strtotime Misbehaves with Years

From: Date: Fri, 20 Dec 2019 12:00:00 +0000
Subject: Bug #79006 [NEW]: Function strtotime Misbehaves with Years
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224442@lists.php.net to get a copy of this message
From: lesichkovm at gmail dot com Operating system: PHP version: 7.4.1 Package: Date/time related Bug Type: Bug Bug description:Function strtotime Misbehaves with Years Description: ------------ String to time does not work correct when a year is provided. Example: echo date('Y-m-d', strtotime('2016')); Returns: 2019-12-20 Test script: --------------- <?php echo date('Y-m-d', strtotime('2016')); Expected result: ---------------- 2016-01-01 Actual result: -------------- 2019-12-20 -- Edit bug report at https://bugs.php.net/bug.php?id=79006&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79006&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79006&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79006&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79006&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79006&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79006&r=support Expected behavior: https://bugs.php.net/fix.php?id=79006&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79006&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79006&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79006&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79006&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79006&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79006&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79006&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79006&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79006&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79006&r=mysqlcfg

« previous php.bugs (#224442) next »