wp_timezone()

Retrieves the timezone from site settings as a DateTimeZone object.


Description Description

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


Top ↑

Return Return

(DateTimeZone) Timezone object.


Top ↑

Source Source

File: wp-includes/functions.php

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


Top ↑

Changelog Changelog

Changelog
Version Description
5.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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