mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-19 18:54:26 +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:
@@ -2791,7 +2791,7 @@ class WP_Test_REST_Users_Controller extends WP_Test_REST_Controller_Testcase {
|
||||
$this->assertEquals( $user->user_email, $data['email'] );
|
||||
$this->assertEquals( (object) $user->allcaps, $data['capabilities'] );
|
||||
$this->assertEquals( (object) $user->caps, $data['extra_capabilities'] );
|
||||
$this->assertEquals( date( 'c', strtotime( $user->user_registered ) ), $data['registered_date'] );
|
||||
$this->assertEquals( gmdate( 'c', strtotime( $user->user_registered ) ), $data['registered_date'] );
|
||||
$this->assertEquals( $user->user_login, $data['username'] );
|
||||
$this->assertEquals( $user->roles, $data['roles'] );
|
||||
$this->assertEquals( get_user_locale( $user ), $data['locale'] );
|
||||
|
||||
Reference in New Issue
Block a user