[wp-trac] [WordPress Trac] #57035: Error in current_time() function when using timestamp and no value for gmt_offset
WordPress Trac
noreply at wordpress.org
Tue Mar 28 09:37:10 UTC 2023
#57035: Error in current_time() function when using timestamp and no value for
gmt_offset
-----------------------------------+-----------------------
Reporter: Nick_theGeek | Owner: audrasjb
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.2
Component: Date/Time | Version: 5.3
Severity: normal | Resolution:
Keywords: has-patch php8 commit | Focuses:
-----------------------------------+-----------------------
Changes (by Rarst):
* status: closed => reopened
* resolution: fixed =>
Comment:
As reported in #57998 the fix is faulty because `gmt_offset` can be a
float value for partial-hour offsets (e.g. +11:30). The product of offset
and hour in seconds should be integer (as expressed by original logic),
but the offset should not.
Probably needs unit test for the case, if it slipped through the existing
ones.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57035#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list