[wp-trac] [WordPress Trac] #57998: current_time function: GMT offset is not always an integer
WordPress Trac
noreply at wordpress.org
Tue Mar 28 14:36:43 UTC 2023
#57998: current_time function: GMT offset is not always an integer
--------------------------------------+-----------------------------
Reporter: reputeinfosystems | Owner: hellofromTonya
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.2
Component: Date/Time | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------------
Comment (by spacedmonkey):
Wonder if could cast to float?
{{{#!php
return $gmt ? time() : time() + ( (float) get_option( 'gmt_offset' ) *
HOUR_IN_SECONDS );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57998#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list