[wp-trac] [WordPress Trac] #51625: Date/Time test failures during DST transition

WordPress Trac noreply at wordpress.org
Sun Oct 25 01:25:22 UTC 2020


#51625: Date/Time test failures during DST transition
----------------------------+-----------------------------
 Reporter:  SergeyBiryukov  |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Date/Time       |    Version:
 Severity:  normal          |   Keywords:
  Focuses:                  |
----------------------------+-----------------------------
 There are some tests in Europe/London and Europe/Kiev timezones that fail
 exactly during the hour of DST transition, October 25th 2020, 00:00 to
 01:00 (UTC):
 {{{
 There were 4 failures:

 1) Tests_Date_Current_Time::test_should_return_correct_local_time
 The dates should be equal
 Failed asserting that 1603588676 matches expected 1603585076.

 /var/www/tests/phpunit/includes/phpunit7/testcase.php:38
 /var/www/tests/phpunit/tests/date/currentTime.php:116

 2) Tests_Date_I18n::test_should_return_wp_timestamp
 The dates should be equal
 Failed asserting that 1603585076 matches expected 1603588676.

 /var/www/tests/phpunit/includes/phpunit7/testcase.php:38
 /var/www/tests/phpunit/tests/date/dateI18n.php:152

 3)
 Tests_Date_Get_Feed_Build_Date::test_should_fall_back_to_last_post_modified
 Fall back to time of last post modified with no posts
 Failed asserting that false matches expected 1603588676.

 /var/www/tests/phpunit/includes/phpunit7/testcase.php:38
 /var/www/tests/phpunit/tests/date/getFeedBuildDate.php:67

 4) Tests_Formatting_Date::test_get_gmt_from_date_string_date
 The dates should be equal
 Failed asserting that 1603588686 matches expected 1603585086.

 /var/www/tests/phpunit/includes/phpunit7/testcase.php:38
 /var/www/tests/phpunit/tests/formatting/date.php:88
 }}}
 https://travis-ci.com/github/WordPress/wordpress-develop/builds/192590290

 To reproduce locally, just set the system date to the date and time above.

 These should ideally be made less fragile. Since we already have some
 tests for DST specifically, perhaps these tests should use a timezone that
 does not observe DST.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51625>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list