Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#57705 closed enhancement (fixed)

Reusage timezone in mysql2date

Reported by: spacedmonkey Owned by: spacedmonkey
Priority: normal Milestone: 6.3
Component: Date/Time Version: 5.3
Severity: normal Keywords: has-patch commit early
Cc: Focuses: performance

Description

In the mysql2date function, we can use the timezone again and pass it to wp_date to save some calls to get_option.

Change History (15)

This ticket was mentioned in ​PR #4063 on ​WordPress/wordpress-develop by ​@spacedmonkey.


4 years ago
#1

  • Keywords has-patch added

​@spacedmonkey commented on ​PR #4063:


4 years ago
#2

@SergeyBiryukov Should I commit and make part of 6.2? It is a very small change.

#3 @spacedmonkey
4 years ago

  • Keywords commit added
  • Milestone Awaiting Review → 6.2

As this is such a small change, I am going to mark this as commit and add to 6.2.

I am going to ask @rarst if he is happy here as well.

This ticket was mentioned in ​Slack in #core by costdev. ​View the logs.


4 years ago

#5 @audrasjb
4 years ago

Thanks for the enhancement, this looks good to ship with 6.2 beta 2 today.

#6 @costdev
4 years ago

  • Milestone 6.2 → 6.3
  • Type defect (bug) → enhancement

This ticket was discussed during the pre-release-party bug scrub ahead of 6.2 Beta 2. As this is an enhancement, and the deadline for enhancements has passed, I'm reclassifying this ticket and moving to the 6.3 milestone.

Additional props: @SergeyBiryukov @hellofromTonya @audrasjb @davidbaumwald

#7 @Rarst
4 years ago

Looks fine to me. :)

#8 @spacedmonkey
4 years ago

  • Milestone 6.3 → 6.2

#9 @spacedmonkey
4 years ago

  • Owner set to spacedmonkey
  • Resolution → fixed
  • Status new → closed

In 55343:

Date/Time: Save a call to wp_timezone in mysql2date.

Save a call to wp_timezone in mysql2date by saving the timezone to a variable and pass it into wp_date function call.

Props spacedmonkey, costdev, SergeyBiryukov, audrasjb.
Fixes #57705.

​@spacedmonkey commented on ​PR #4063:


4 years ago
#10

Committed

#11 @peterwilsoncc
4 years ago

  • Resolution fixed
  • Status closed → reopened

From dicussions I've had, it appears there was some confusion about the state of the commit cycle.

Following those discussions, I'm reopening this so it [55343] can be reverted from 6.2 for recommit in 6.3. I'm leaving it on the 6.2 milestone for now to be moved after the revert, this will avoid it getting missed.

#12 @peterwilsoncc
4 years ago

In 55344:

Date/Time: Revert mysql2date changes in [55343].

These changes will be targeted to the 6.3 release.

See #57705.

#13 @peterwilsoncc
4 years ago

  • Milestone 6.2 → 6.3

#14 @mukesh27
4 years ago

  • Keywords early added

This ticket was discussed in the recent performance bug scrub.

Ticket is ready for commit.

#15 @spacedmonkey
4 years ago

  • Resolution → fixed
  • Status reopened → closed

In 55514:

Date/Time: Save a call to wp_timezone in mysql2date.

Save a call to wp_timezone in mysql2date by saving the timezone to a variable and pass it into wp_date function call.

Props spacedmonkey, costdev, SergeyBiryukov, audrasjb.
Fixes #57705.

Note: See TracTickets for help on using tickets.