wp_timezone(): DateTimeZone

In this article

Retrieves the timezone of the site as a DateTimeZone object.

Description

Timezone can be based on a PHP timezone string or a ±HH:MM offset.

Return

DateTimeZone Timezone object.

Source

function wp_timezone() {
	return new DateTimeZone( wp_timezone_string() );
}

Changelog

VersionDescription
5.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.