-
Bug
-
Resolution: Fixed
-
Minor
-
3.3.13
-
None
There're edge cases when time crosses the threshold of DST transition. In those cases function phpbb_gmgetdate() returns incorrect results, hours returned can be 1 earlier (when DST is +1 increasing) and vice versa.
Example:
Antarctica/South_Pole is changed to daylight saving time (DST) at 2:00 AM on Sunday, Sep 29, 2024 local time (making the timezone +13 instead of +12). Now when you use phpbb_gmgetdate() at some point in time earlier than UTC 2:00 AM, Sep 29, 2024, f.e. at 4:00 AM on Sunday, Sep 29, 2024 local Antarctica/South_Pole time, it internally uses getdate(time() - date('Z')), but when it makes this subtraction it gets time earlier than DST transition time point (-13 hours) so it (getdate()) considers DST as not yet applied. Thus it yields incorrect result for UTC date info (1 hour ealier than the real time).