[wp-trac] [WordPress Trac] #57683: Improve performance of mysql2date

WordPress Trac noreply at wordpress.org
Tue Mar 7 15:44:40 UTC 2023


#57683: Improve performance of mysql2date
--------------------------+-----------------------------
 Reporter:  spacedmonkey  |       Owner:  (none)
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Date/Time     |     Version:  0.71
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  performance
--------------------------+-----------------------------

Comment (by Rarst):

 Yeah, that was my initial suggestion above - to drop nysqk2date it from
 here. :)

 The PR looks tad wrong though, because without specifying time zone you
 would try to parse local time as UTC (or who knows what if end user messes
 with it, we are trying to proof against that in the long run). remember -
 the database field doesn't contain any time zone information, so it can't
 be parsed out of it.

 With some more thinking I am now pondering that we probably need a proper
 mysql2date replacement. Otherwise everywhere this (parsing post time from
 database) needs to be done there will be potential for diverging
 implementations and slip ups.

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


More information about the wp-trac mailing list