Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 16 months ago

#38815 closed defect (bug) (fixed)

Race conditions in Tests_Formatting_Date

Reported by: ocean90 Owned by: SergeyBiryukov
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:


Same as #38381 but for Tests_Formatting_Date.

Example: Tests_Formatting_Date::test_get_gmt_from_date_string_date() in https://travis-ci.org/aaronjorbin/develop.wordpress/jobs/176355621#L295

Attachments (1)

38815.patch (1017 bytes) - added by keesiemeijer 4 years ago.
Add a delta for comparing timestamps

Download all attachments as: .zip

Change History (6)

4 years ago

Add a delta for comparing timestamps

#1 @keesiemeijer
4 years ago

  • Keywords has-patch added; needs-patch removed

in 38815.patch I've also removed strtotime( 'now' ) from the timestamp parameter in gmdate() as it defaults to the current local time if a timestamp is not given.

Last edited 4 years ago by keesiemeijer (previous) (diff)

#2 @SergeyBiryukov
3 years ago

#42263 was marked as a duplicate.

#3 @SergeyBiryukov
3 years ago

  • Milestone changed from Future Release to 4.9

#4 @SergeyBiryukov
3 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 41920:

Date/Time: Use delta comparison in get_gmt_from_date() tests to avoid race conditions.

Props keesiemeijer.
Fixes #38815.

This ticket was mentioned in Slack in #core-datetime by sergey. View the logs.

16 months ago

Note: See TracTickets for help on using tickets.