Changeset 45883
- Timestamp:
- 08/23/2019 01:11:22 AM (5 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/dashboard.php
r45674 r45883 861 861 862 862 $today = current_time( 'Y-m-d' ); 863 $tomorrow = gmdate( 'Y-m-d', strtotime( '+1 day', current_time( 'timestamp' ) ));863 $tomorrow = current_datetime()->modify( '+1 day' )->format( 'Y-m-d' ); 864 864 $year = current_time( 'Y' ); 865 865 -
trunk/src/wp-includes/functions.php
r45882 r45883 78 78 79 79 return $datetime->format( $type ); 80 } 81 82 /** 83 * Retrieves the current time as an object with the timezone from settings. 84 * 85 * @since 5.3.0 86 * 87 * @return DateTimeImmutable Date and time object. 88 */ 89 function current_datetime() { 90 return new DateTimeImmutable( 'now', wp_timezone() ); 80 91 } 81 92
Note: See TracChangeset
for help on using the changeset viewer.