Req #51934 [Opn->Csd]: strtotime plurals / incorrect time

From: Date: Fri, 13 May 2022 10:57:32 +0000
Subject: Req #51934 [Opn->Csd]: strtotime plurals / incorrect time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241481@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=51934&edit=1

 ID:                 51934
 Updated by:         derick@php.net
 Reported by:        brent dot hansen at gmail dot com
 Summary:            strtotime plurals / incorrect time
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            Date/time related
 Operating System:   Win 7 Pro
 PHP Version:        5.3.2
-Assigned To:        
+Assigned To:        derick
 Block user comment: N
 Private report:     N

 New Comment:

Fixed in the dependent 'timelib' library, likely for PHP 8.1.7 or 8.1.1, depending on
timing.


Previous Comments:
------------------------------------------------------------------------
[2021-08-11 11:03:33] cmb@php.net

For reference: <https://3v4l.org/T6m7S>.

------------------------------------------------------------------------
[2010-06-03 13:52:10] derick@php.net

Changing this to a feature request instead

------------------------------------------------------------------------
[2010-06-03 13:11:43] sjoerd@php.net

It interprets the S as Sierra Time Zone. Similar to:
echo date("Y-m-d H:i:s",strtotime("4 SundayPST ago"));

------------------------------------------------------------------------
[2010-05-27 19:18:54] 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


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=51934&edit=1


Thread (6 messages)

« previous php.bugs (#241481) next »