Bug #77144 [NEW]: strtotime date week conversion
From: frank dot hartmann at netfira dot com
Operating system: Windows Server 2016
PHP version: 7.2.12
Package: Date/time related
Bug Type: Bug
Bug description:strtotime date week conversion
Description:
------------
The 31st of December 2018 is converted to the first week of 2018 instead
of the first week of 2019 when using a combination of strototime and
date.
Test script:
---------------
echo date("W-Y", strtotime("2018-12-31T00:00:00Z"))."\n"; //outputs
01-2018 instead of 01-2019
echo date("d-m-Y", strtotime("2018-12-31T00:00:00Z")); // correct
calculation
Expected result:
----------------
I expect to see 01-2019 as the output of the first line
--
Edit bug report at https://bugs.php.net/bug.php?id=77144&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77144&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77144&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77144&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77144&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77144&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77144&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77144&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77144&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77144&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77144&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77144&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77144&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77144&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77144&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77144&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77144&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77144&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77144&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77144&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77144&r=mysqlcfg
Thread (3 messages)
- frank dot hartmann at netfira dot com