Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#57705 closed enhancement (fixed)

Reusage timezone in mysql2date

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

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.


2 years ago
#1

  • Keywords has-patch added

@spacedmonkey commented on PR #4063:


2 years ago
#2

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

#3 @spacedmonkey
2 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 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.


2 years ago

#5 @audrasjb
2 years ago

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

#6 @costdev
2 years ago

  • Milestone changed from 6.2 to 6.3
  • Type changed from defect (bug) to 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
2 years ago

Looks fine to me. :)

#8 @spacedmonkey
2 years ago

  • Milestone changed from 6.3 to 6.2

#9 @spacedmonkey
2 years ago

  • Owner set to spacedmonkey
  • Resolution set to fixed
  • Status changed from new to 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:


2 years ago
#10

Committed

#11 @peterwilsoncc
2 years ago

  • Resolution fixed deleted
  • Status changed from closed to 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
2 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
2 years ago

  • Milestone changed from 6.2 to 6.3

#14 @mukesh27
2 years ago

  • Keywords early added

This ticket was discussed in the recent performance bug scrub.

Ticket is ready for commit.

#15 @spacedmonkey
2 years ago

  • Resolution set to fixed
  • Status changed from reopened to 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.