[wp-trac] [WordPress Trac] #46438: Change all instances of date() to gmdate()
WordPress Trac
noreply at wordpress.org
Sun May 26 00:11:45 UTC 2019
#46438: Change all instances of date() to gmdate()
-------------------------+-----------------------------
Reporter: Rarst | Owner: SergeyBiryukov
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.3
Component: Date/Time | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
-------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"45424" 45424]:
{{{
#!CommitTicketReference repository="" revision="45424"
Date/Time: Replace all instances of `date()` with `gmdate()`.
Use of `date()` in core depends on PHP timezone set to UTC and not changed
by third party code (which cannot be guaranteed).
`gmdate()` is functionally equivalent, but is not affected by PHP timezone
setting: it's always UTC, which is the exact behavior the core needs.
Props nielsdeblaauw, Rarst.
Fixes #46438. See #44491.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46438#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list