Bug #77788 [Com]: date_add returns invalid time during DST transition
| From: | george dot chailazopoulos at gmail dot com | Date: | Mon, 28 Mar 2022 07:34:51 +0000 |
| Subject: | Bug #77788 [Com]: date_add returns invalid time during DST transition | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-240522@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77788&edit=1
ID: 77788
Comment by: george dot chailazopoulos at gmail dot com
Reported by: r dot schuil at gmail dot com
Summary: date_add returns invalid time during DST transition
Status: No Feedback
Type: Bug
Package: Date/time related
Operating System: Ubuntu
PHP Version: 7.2.16
Assigned To: derick
Block user comment: N
Private report: N
New Comment:
This issue is not fixed.
Derick your should test the script with php -ddate.timezone=Europe/Athens instead of Berlin
Previous Comments:
------------------------------------------------------------------------
[2021-04-18 04:22:10] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2021-04-06 19:02:48] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
I can't reproduce this with PHP 7.2.10, 7.2.35, 7.3.25, nor 8.0.3:
8.0.4-dev derick@gargleblaster:~/dev/php/php-src.git$ php -ddate.timezone=Europe/Berlin
<?php
$date = date_create('2019-01-31 02:00:12');
date_add($date, date_interval_create_from_date_string('2 months'));
echo date_format($date, 'Y-m-d H:i:s');
?>
2019-03-31 03:00:12
------------------------------------------------------------------------
[2021-03-28 07:34:48] r dot schuil at gmail dot com
Still not fixed?
------------------------------------------------------------------------
[2019-03-24 09:43:11] r dot schuil at gmail dot com
$ php -r 'echo date_default_timezone_get();
Europe/Berlin
------------------------------------------------------------------------
[2019-03-24 09:37:51] requinix@php.net
What does date_default_timezone_get() return?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=77788
--
Edit this bug report at https://bugs.php.net/bug.php?id=77788&edit=1