You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears this issue goes beyond date_default_timezone_get() although it's certainly a good start. It appears the change was not fully intentional or is complicated as per php/php-src#11496 -- in any case, this issue certainly deserves more digging into.
When I opened this issue I was not sure where to open it. I've yet identified this change and collateral effect.
When we try to check timezone effect on our server , we catch this inconsistance as :
before 8.2 ini_get("date.timezone") is empty and date_default_timezone_get() return timezone server
after 8.2 ini_get("date.timezone") is no more empty and return UTC , date_default_timezone_get() do same
To prevent developer to misunderstood this change, could be interesting to provide an "official" note as it's a breaking change.
An other effect we can't anymore detect if configuration is forced/configured to UTC or without any configuration. To detect this only solution looks to check all configuration file (php.ini, pool.d/*, ...)
This really should be noted, both on DateTime page, and in the upgrade appendices.
Just did a pretty big update fra 8.1 to 8.4, and now have a lot of work to fix all the incorrect timestamps in our backend, and we have gone through the appendices with utmost care to avoid situations exactly like this.
Not to mention the time it took to determine what had actually happened.
Affected page
https://www.php.net/manual/en/function.date-default-timezone-get.php
Current issue
When date.timezone is undefined
date_default_timezone_get()
return a different value regarding version used.Suggested improvement
When date.timezone is undefined
date_default_timezone_get()
return :The text was updated successfully, but these errors were encountered: