[wp-trac] [WordPress Trac] #46438: Change all instances of date() to gmdate()

WordPress Trac noreply at wordpress.org
Thu Mar 7 09:33:25 UTC 2019


#46438: Change all instances of date() to gmdate()
-------------------------+-----------------------------
 Reporter:  Rarst        |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Date/Time    |    Version:
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:               |
-------------------------+-----------------------------
 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

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46438>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list