[wp-trac] [WordPress Trac] #46483: Eliminate use of date_default_timezone_set() for calculations in core

WordPress Trac noreply at wordpress.org
Wed Mar 13 15:54:12 UTC 2019


#46483: Eliminate use of date_default_timezone_set() for calculations in core
-------------------------+-----------------------------
 Reporter:  Rarst        |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Date/Time    |    Version:
 Severity:  minor        |   Keywords:  needs-patch
  Focuses:               |
-------------------------+-----------------------------
 Core sets PHP timezone to UTC on boot and assumes it for Date/Time
 operations. Which we are in process of improving to eliminate ''reliance''
 on this assumption in #44491

 However there are also couple places in core where it changes PHP time
 zone back and forth for calculations:

  - in options to determine DST status
  - in PHPMailer (which I assume is just inherited from upstream)

 We should get rid of these, calculations should not need to rely on
 manipulating global PHP configuration state.

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


More information about the wp-trac mailing list