current_datetime(): DateTimeImmutable
Retrieves the current time as an object using the site’s timezone.
Return
DateTimeImmutable Date and time object.
Source
File: wp-includes/functions.php
.
View all references
function current_datetime() {
return new DateTimeImmutable( 'now', wp_timezone() );
}
Changelog
Version | Description |
---|---|
5.3.0 | Introduced. |