[wp-trac] [WordPress Trac] #57683: Improve performance of mysql2date
WordPress Trac
noreply at wordpress.org
Fri Mar 17 15:56:17 UTC 2023
#57683: Improve performance of mysql2date
------------------------------+---------------------------
Reporter: spacedmonkey | Owner: spacedmonkey
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.3
Component: Date/Time | Version: 0.71
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses: performance
------------------------------+---------------------------
Changes (by spacedmonkey):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"55558" 55558]:
{{{
#!CommitTicketReference repository="" revision="55558"
Date / Time: Remove usage of mysql2date in generate_postdata method.
Remove usage of `mysql2date` in `generate_postdata`. `mysql2date` has a
performance overhead, as it creates a `DateTimeZone` object each time it
is called. Use a simple
sub string function to generate the values needed for the `currentmonth`
and `currentday` global variables.
Props spacedmonkey, Rarst, SergeyBiryukov, flixos90.
Fixes #57683.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57683#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list