Bug #80540 [NEW]: Wrong strtotime() result

From: Date: Tue, 22 Dec 2020 08:31:07 +0000
Subject: Bug #80540 [NEW]: Wrong strtotime() result
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231215@lists.php.net to get a copy of this message
From: kekrta500 at gmail dot com Operating system: Debian PHP version: 7.3.25 Package: Math related Bug Type: Bug Bug description:Wrong strtotime() result Description: ------------ <?php $start = strtotime('2020-03-08'); $end = strtotime('2020-03-09'); echo (($end - $start) / 24 / 60 / 60); // https://sandbox.onlinephpfunctions.com/code/fff39352ad15de4414a53383499d02056f53bb22 Test script: --------------- <?php $start = strtotime('2020-03-08'); $end = strtotime('2020-03-09'); echo (($end - $start) / 24 / 60 / 60); Expected result: ---------------- 1 Actual result: -------------- 0.95833333333333 -- Edit bug report at https://bugs.php.net/bug.php?id=80540&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80540&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80540&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80540&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80540&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80540&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80540&r=support Expected behavior: https://bugs.php.net/fix.php?id=80540&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80540&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80540&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80540&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80540&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80540&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80540&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80540&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80540&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80540&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80540&r=mysqlcfg

« previous php.bugs (#231215) next »