#46438 closed enhancement (fixed)
Change all instances of date() to gmdate()
Reported by: | Rarst | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Date/Time | Keywords: | has-patch |
Focuses: | Cc: |
Description
Use of date()
in core depends on PHP timezone set to UTC (performed by the core boot) and not changed by third party code (which cannot be guaranteed).
All instances of date()
in core should be replaced with gmdate()
, which is functionally equivalent but is not affected by PHP time zone setting (it's always UTC which is the exact behavior we need).
One of the steps for eliminating dependency on UTC timezone setting, see #44491
Attachments (4)
Change History (11)
This ticket was mentioned in Slack in #core-datetime by rarst. View the logs.
6 years ago
#3
@
6 years ago
I spotted that couple of changes are in upstream-ish libs (PHPMailer, SimplePie) so we might want to skip those. Otherwise looks good to me.
#4
@
5 years ago
- Keywords has-patch added; needs-patch removed
I have rebased patch on latest master, threw out some white space changes that sneaked in, and ommitted couple changes in semi-external pieces for now.
Previously: #37440