[wp-trac] [WordPress Trac] #48623: WP 5.3 time problem causes day number shifts in permalinks

WordPress Trac noreply at wordpress.org
Thu Nov 14 17:51:04 UTC 2019


#48623: WP 5.3 time problem causes day number shifts in permalinks
--------------------------+---------------------
 Reporter:  steevithak    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.3.1
Component:  Date/Time     |     Version:  5.3
 Severity:  major         |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------

Comment (by Rarst):

 > In 5.2 and older versions you generated the permalinks using date(),
 which renders the permalink in the user's local time zone but starting in
 5.3 you're using gmdate(), which seems wrong as it renders the link in UTC

 This does not sound right, WP core sets PHP time zone to UTC on boot, so
 `date()` does not and should not operate with local time (that's why we
 replaced it with `gmdate()` which is equivalent for UTC, but does not get
 broken if something goes and changes time zone).

 I will review the logic on fresh head tomorrow, thank you. :)

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


More information about the wp-trac mailing list