classes/Events/API/Util.php
public static function getClientTimezone($user = null) {

		if (isset(self::$timezone)) {
			return self::$timezone;
		}

		$preferred = array();

		$preferred[] = get_input('timezone');

		if ($user == null) {
			$user = elgg_get_logged_in_user_entity();
		}
		
		if ($user) {
			$preferred[] = $user->timezone;
		}

		if (defined('ELGG_SITE_TIMEZONE')) {
			$preferred[] = ELGG_SITE_TIMEZONE;
		}

		$preferred[] = date('e');

		foreach ($preferred as $id) {
			if (self::isValidTimezone($id)) {
				self::$timezone = $id;
				return $id;
			}
		}

		return Util::UTC;
	}
public static function getClientTimezone($user = null) {

		if (isset(self::$timezone)) {
			return self::$timezone;
		}

		$preferred = array();

		$preferred[] = get_input('timezone');

		if ($user == null) {
			$user = elgg_get_logged_in_user_entity();
		}
		
		if ($user) {
			$preferred[] = $user->timezone;
		}

		if (defined('ELGG_SITE_TIMEZONE')) {
			$preferred[] = ELGG_SITE_TIMEZONE;
		}

		$preferred[] = date('e');

		foreach ($preferred as $id) {
			if (self::isValidTimezone($id)) {
				self::$timezone = $id;
				return $id;
			}
		}

		return Util::UTC;
	}
public static function getClientTimezone ( $ user = null ) { if ( isset ( self :: $ timezone ) ) { return self :: $ timezone ; } $ preferred = array ( ) ; $ preferred [ ] = get_input ( 'timezone' ) ; if ( $ user == null ) { $ user = elgg_get_logged_in_user_entity ( ) ; } if ( $ user ) { $ preferred [ ] = $ user -> timezone ; } if ( defined ( 'ELGG_SITE_TIMEZONE' ) ) { $ preferred [ ] = ELGG_SITE_TIMEZONE ; } $ preferred [ ] = date ( 'e' ) ; foreach ( $ preferred as $ id ) { if ( self :: isValidTimezone ( $ id ) ) { self :: $ timezone = $ id ; return $ id ; } } return Util :: UTC ; }
Returns display timezone

Returns first set value from the following:
1. Request query element
2. Timezone set by the user in their settings
3. Timezone set as site default
4. PHP timezone

@param ElggUser $user User
@return string
Returns display timezone