[wp-trac] [WordPress Trac] #44491: Date/time calculations should not depend on default UTC time zone
WordPress Trac
noreply at wordpress.org
Sun May 26 00:11:45 UTC 2019
#44491: Date/time calculations should not depend on default UTC time zone
-------------------------+------------------------------
Reporter: Rarst | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by SergeyBiryukov):
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/44491#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list