|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-05-27 19:18 UTC] brent dot hansen at gmail dot com
Description:
------------
Pluralization seems to remove 1 hour from calculation or drops daylight savings adjustment.
Notes:
date.timezone = America/Los_Angeles
Correction to PHP version: 5.3.1
Test script:
---------------
date("Y-m-d H:i:s",strtotime("4 Sunday ago"));
date("Y-m-d H:i:s",strtotime("4 Sundays ago"));
Expected result:
----------------
2010-05-01 00:00:00
2010-05-01 00:00:00
Actual result:
--------------
2010-05-01 00:00:00
2010-04-30 23:00:00
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
It interprets the S as Sierra Time Zone. Similar to: echo date("Y-m-d H:i:s",strtotime("4 SundayPST ago"));