mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Date/Time: Replace all instances of date() with gmdate().
Use of `date()` in core depends on PHP timezone set to UTC and not changed by third party code (which cannot be guaranteed). `gmdate()` is functionally equivalent, but is not affected by PHP timezone setting: it's always UTC, which is the exact behavior the core needs. Props nielsdeblaauw, Rarst. Fixes #46438. See #44491. git-svn-id: https://develop.svn.wordpress.org/trunk@45424 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -99,7 +99,7 @@ if ( is_multisite() ) :
|
||||
remove_filter( 'wpmu_signup_user_notification', '__return_true' );
|
||||
|
||||
global $wpdb;
|
||||
$date = date( 'Y-m-d H:i:s', time() - ( 2 * DAY_IN_SECONDS ) - 60 );
|
||||
$date = gmdate( 'Y-m-d H:i:s', time() - ( 2 * DAY_IN_SECONDS ) - 60 );
|
||||
$wpdb->update( $wpdb->signups, array( 'registered' => $date ), array( 'user_login' => 'foo123' ) );
|
||||
|
||||
$v = wpmu_validate_user_signup( 'foo123', 'foo2@example.com' );
|
||||
@@ -123,7 +123,7 @@ if ( is_multisite() ) :
|
||||
remove_filter( 'wpmu_signup_user_notification', '__return_true' );
|
||||
|
||||
global $wpdb;
|
||||
$date = date( 'Y-m-d H:i:s', time() - ( 2 * DAY_IN_SECONDS ) - 60 );
|
||||
$date = gmdate( 'Y-m-d H:i:s', time() - ( 2 * DAY_IN_SECONDS ) - 60 );
|
||||
$wpdb->update( $wpdb->signups, array( 'registered' => $date ), array( 'user_login' => 'foo123' ) );
|
||||
|
||||
$v = wpmu_validate_user_signup( 'foo2', 'foo2@example.com' );
|
||||
|
||||
Reference in New Issue
Block a user