Tribe__Events__Timezones::get_event_timezone_abbr( int|null $event_id = null )

Returns the event’s timezone abbreviation if it can be determined, or else falls back on the full timezone string/offset text (again, if known – if it is not it will assume the global WP timezone setting).


Parameters

$event_id

(int|null) (Optional)

Default value: null


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Timezones.php

	public static function get_event_timezone_abbr( $event_id = null ) {
		$abbr = get_post_meta( $event_id, '_EventTimezoneAbbr', true );

		if ( empty( $abbr ) ) {
			$timezone_string = self::get_event_timezone_string( $event_id );
			$date = tribe_get_start_date( $event_id, true, Tribe__Date_Utils::DBDATETIMEFORMAT );
			$abbr = self::abbr( $date, $timezone_string );
		}

		return empty( $abbr )
			? $timezone_string
			: $abbr;
	}