[wp-trac] [WordPress Trac] #48384: get_post_time returns wrong value after timezone switch

WordPress Trac noreply at wordpress.org
Thu Oct 24 11:03:34 UTC 2019


#48384: get_post_time returns wrong value after timezone switch
-------------------------------------------------+-------------------------
 Reporter:  david.binda                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.3.1
Component:  Date/Time                            |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests commit      |     Focuses:
  dev-feedback                                   |
-------------------------------------------------+-------------------------

Comment (by Rarst):

 Added patch to adjust column date implementation. Went with
 `get_post_timestamp()` since it's most semantically fitting for the task,
 though it will still suffer from time zone slipping on change, which is
 waaay to large of a problem to address here).

 Effectively there are two standing patches for two issues:
 1. Enabling `get_post_datetime()` to replicate legacy behavior of
 instancing from local or UTC time in database
 2. Fixing handling `column_date()` logic

 Local time changing with time zone change is a larger major issue in core
 and there is the #38774 ticket for it.

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


More information about the wp-trac mailing list