[wp-trac] [WordPress Trac] #48642: Scheduled posts times are displayed incorrectly

WordPress Trac noreply at wordpress.org
Thu Nov 14 22:40:11 UTC 2019


#48642: Scheduled posts times are displayed incorrectly
--------------------------+------------------------------
 Reporter:  charveyunm    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:  5.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by Otto42):

 Replying to [comment:5 charveyunm]:
 > I think I may have found our culprit
 > sleuthing our code I found several places where we use
 date_default_timezone_set('America/Denver');
 > commenting that out seems to have fixed some of our display issues.

 Yes, that would be a problem. WordPress expects the
 date_default_timezone_set to always be UTC. It calculates its own offsets
 internally. Some of this timezone code changed in 5.3, so there may be
 bugs here and there, but if you're changing the default timezone, then
 there would have been other problems even in previous versions. Maybe not
 the same results, but definitely problems.

 Custom code should not need to change the default timezone if you use the
 WordPress time functions.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48642#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list