wp_timezone_override_offset(): float|false

Modifies gmt_offset for smart timezone handling.

Description

Overrides the gmt_offset option if we have a timezone_string available.

Return

float|false Timezone GMT offset, false otherwise.

Source

 *
 * Overrides the gmt_offset option if we have a timezone_string available.
 *
 * @since 2.8.0
 *
 * @return float|false Timezone GMT offset, false otherwise.
 */
function wp_timezone_override_offset() {
	$timezone_string = get_option( 'timezone_string' );
	if ( ! $timezone_string ) {
		return false;
	}

	$timezone_object = timezone_open( $timezone_string );

Changelog

VersionDescription
2.8.0Introduced.

User Contributed Notes

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