A WordPress-centric search engine for devs and theme authors



wp_timezone ›

Since5.3.0
Deprecatedn/a
wp_timezone ( No parameters )
Returns:
  • (DateTimeZone) Timezone object.
Defined at:
Codex:

Retrieves the timezone from site settings as a `DateTimeZone` object.

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



Source

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