Make WordPress Core


Ignore:
Timestamp:
03/07/2019 09:11:37 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Date/Time: Reduce explicit local current_time( 'timestamp' ) usage in favor of native PHP functions.

Timestamps don't carry any timezone information, using the intended format directly simplifies the logic and makes the code less confusing.

Props Rarst, jdgrimes.
See #40657.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/user.php

    r44775 r44809  
    13931393        }
    13941394
    1395         $time_diff = current_time( 'timestamp', true ) - $timestamp;
     1395        $time_diff = time() - $timestamp;
    13961396
    13971397        if ( $time_diff >= 0 && $time_diff < DAY_IN_SECONDS ) {
Note: See TracChangeset for help on using the changeset viewer.