Make WordPress Core

Changeset 40284


Ignore:
Timestamp:
03/13/2017 03:06:10 PM (8 years ago)
Author:
jnylen0
Message:

REST API: Fix DST handling in a test.

The time chosen for test_empty_post_date_gmt_shimmed_using_post_date falls within US daylight savings time. This may cause the test to fail depending on whether the current locale has DST.

The fix is to specify a numeric gmt_offset rather than a timezone_string.

Unprops jnylen0.
Fixes #40136.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php

    r40122 r40284  
    22432243
    22442244        wp_set_current_user( self::$editor_id );
    2245         update_option( 'timezone_string', 'America/Chicago' );
     2245        update_option( 'timezone_string', '' );
     2246        update_option( 'gmt_offset', -6 );
    22462247
    22472248        // Need to set dates using wpdb directly because `wp_update_post` and
     
    22882289
    22892290        update_option( 'timezone_string', '' );
     2291        update_option( 'gmt_offset', 0 );
    22902292    }
    22912293
Note: See TracChangeset for help on using the changeset viewer.