WordPress at a glance
function is not described

iso8601_timezone_to_offset() WP 1.5.0

Given an ISO 8601 timezone, returns its UTC offset in seconds.

No Hooks.

Return

Int|float. The offset in seconds.

Usage

iso8601_timezone_to_offset( $timezone );
$timezone(string) (required)
Either 'Z' for 0 offset or '±hhmm'.

Changelog

Since 1.5.0 Introduced.

Code of iso8601_timezone_to_offset() WP 5.7.2

<?php
function iso8601_timezone_to_offset( $timezone ) {
	// $timezone is either 'Z' or '[+|-]hhmm'.
	if ( 'Z' === $timezone ) {
		$offset = 0;
	} else {
		$sign    = ( '+' === substr( $timezone, 0, 1 ) ) ? 1 : -1;
		$hours   = (int) substr( $timezone, 1, 2 );
		$minutes = (int) substr( $timezone, 3, 4 ) / 60;
		$offset  = $sign * HOUR_IN_SECONDS * ( $hours + $minutes );
	}
	return $offset;
}