-
Notifications
You must be signed in to change notification settings - Fork 7.8k
DateInterval d property is 0 instead of real value 28 #18183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Anyway, it is working well in 8.1.25 |
It works on my machine and on 3v4l: https://3v4l.org/EXC9L |
I do not know. Maybe. Based on DateTime object the timezone is Europe/Budapest: object(DateTime)#6 (3) { |
DateTimeInterface::diff the date 2025-02-28 23:00:00 UTC (2025-03-01 00:00:00 Europe/Budapest) is used instead of the real time before php version 8.1.. |
The timezone_version_get() function returns with this: |
Sorry, I was looking at the wrong version number of PHP. Correct version numbers are 8.0.30 and 7.4.33. As I can see in the snipett the result is the same what I detected. On my dev machine the PHP version is 8.1.25 and timezone version is 2023.3 and there is no problem. And as I said earlier there was no problem in November for example or in last 8 years. Interesting. |
I don't see the issue. As @nielsdos mentions, checking all PHP versions, behaviour is consistent. ![]() |
These versions have long been out of bugfix support, the lowest bugfix-supported version is 8.3.x. Given that this works in those versions I'm closing this as invalid. |
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
Correction
not PHP 8.3.19 PHP 8.0.30 or 7.4.33
Operating System
linux (kernel ver.: 4.18.0-553.33.1.el8_10.x86_64)
The text was updated successfully, but these errors were encountered: