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

WordPress Trac noreply at wordpress.org
Tue Mar 7 18:59:53 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):

 Does it matter in this code verbatim? Maybe not.

 Does it matter that it introduces ambiguity about what time zone the
 operation happens in? Yes. Because that's why this component is so broken
 - it was all coded on that principle.

 If the performance preference here is to process this sans time zone, I
 would rather suggest to tear the input apart into strings (and document
 why it's done that way). Instantiating a DateTime object into knowingly
 invalid state is bad.

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


More information about the wp-trac mailing list