Get time zone id for trial account.

@return string
761967
private function _getTimeZoneId()
    {
        $timeZone = $this->localeDate->getConfigTimezone();
        $result = '085';
        if ($timeZone) {
            foreach ($this->timeZones as $time) {
                if ($time['MageTimeZone'] == $timeZone) {
                    $result = $time['MicrosoftTimeZoneIndex'];
                }
            }
        }

        return $result;
    }
941040
private function getCronTimestamp()
    {
        /* @var $version string e.g. "2.1.7" */
        $version = $this->productMetadata->getVersion();
        if (version_compare($version, '2.2.0') >= 0) {
            return $this->dateTime->gmtTimestamp();
        }
        return $this->timezone->scopeTimeStamp();
    }
1169003
protected function getInternalFormatter($timezone = null)
    {
        if (!$timezone) {
            $timezone = date_default_timezone_get(); // Default to server timezone
        }

        $formatter = IntlDateFormatter::create(
            DBDate::ISO_LOCALE,
            IntlDateFormatter::MEDIUM,
            IntlDateFormatter::MEDIUM,
            $timezone
        );
        $formatter->setLenient(false);

        // Note we omit timezone from this format, and we always assume server TZ
        $formatter->setPattern(DBDatetime::ISO_DATETIME);

        return $formatter;
    }
1151739
public function user_date()
    {
        // get user's timezone
        try {
            $tz   = new DateTimeZone($this->config->get('timezone'));
            $date = new DateTime('now', $tz);
        }
        catch (Exception $e) {
            $date = new DateTime();
        }

        return $date->format('r');
    }
145713
public function getMidnight()
    {
        $formatter = $this->getFrontendFormatter();
        $timestamp = $this->withTimezone($this->getTimezone(), function () {
            return strtotime('midnight');
        });
        return $formatter->format($timestamp);
    }
1106480
public function getAllTimezoneFlat()
    {
        $aTimezones = $this->getAllTimezone();
        $aOut       = [];

        foreach ($aTimezones as $sKey => $mValue) {
            if (is_array($mValue)) {
                foreach ($mValue as $subKey => $subValue) {
                    if (is_string($subValue)) {
                        $aOut[$subKey] = $sKey . ' - ' . $subValue;
                    }
                }
            } else {
                $aOut[$sKey] = $mValue;
            }
        }

        return $aOut;
    }
163860
public function timezone()
	{
		$params = array(
			$this->database,
			$this->user,
			$this->password
		);

		return $this->getClient('common')->call('timezone_get', $params);
	}
870838
public function getSitesIdFromTimezones($timezones)
    {
        Piwik::checkUserHasSuperUserAccess();

        $timezones = Piwik::getArrayFromApiParameter($timezones);
        $timezones = array_unique($timezones);

        $ids = $this->getModel()->getSitesFromTimezones($timezones);

        $return = array();
        foreach ($ids as $id) {
            $return[] = $id['idsite'];
        }

        return $return;
    }
1033423
public static function getTimezoneLabel($tz_id, $format = false, $ts = 'now') {
		if (self::isValidTimezone($tz_id) && $format) {
			$dt = new DateTime(null, new DateTimeZone($tz_id));
			(is_int($ts)) ? $dt->setTimestamp($ts) : $dt->modify($ts);
			return $dt->format($format);
		}

		return elgg_echo($tz_id);
	}
1354184
public function getTimeZone() {
        $tzs = $this->user->getPropertyValues(GenerisRdf::PROPERTY_USER_TIMEZONE);
        $tz = empty($tzs) ? '' : (string)current($tzs);
        return empty($tz) ? TIME_ZONE : $tz;
    }
94070
public DateTimeZone getTimeZone()
    {
        return this.attrValues.get(Person.AttrName.TIMZONE) != null
                        ? DateTimeZone.forID(this.attrValues.get(Person.AttrName.TIMZONE))
                        : DateTimeZone.UTC;
    }
879733
public static function timeZones()
    {
        $timeZones = [];

        $timezone_identifiers = DateTimeZone::listIdentifiers();
        sort($timezone_identifiers);

        $timeZones['UTC'] = Yii::t('podium/view', 'default (UTC)');

        foreach ($timezone_identifiers as $zone) {
            if ($zone != 'UTC') {
                $zoneName = $zone;
                $timeForZone = new DateTime(null, new DateTimeZone($zone));
                $offset = $timeForZone->getOffset();
                if (is_numeric($offset)) {
                    $zoneName .= ' (UTC';
                    if ($offset != 0) {
                        $offset = $offset / 60 / 60;
                        $offsetDisplay = floor($offset) . ':' . str_pad(60 * ($offset - floor($offset)), 2, '0', STR_PAD_LEFT);
                        $zoneName .= ' ' . ($offset < 0 ? '' : '+') . $offsetDisplay;
                    }
                    $zoneName .= ')';
                }
                $timeZones[$zone] = $zoneName;
            }
        }

        return $timeZones;
    }
1207717
public static function getTimezoneInfo($tz_id) {

		$tz = new \DateTimeZone($tz_id);
		$location = $tz->getLocation();
		$country_code = $location['country_code'];

		$dt = new DateTime(null, $tz);

		$region = explode('/', $tz_id);
		if (sizeof($region) > 1) {
			array_shift($region);
		}
		$region = str_replace('_', ' ', implode(', ', $region));

		$tzinfo = new stdClass();
		$tzinfo->id = $tz_id;
		$tzinfo->abbr = $dt->format('T');
		$tzinfo->country_code = $country_code;
		$tzinfo->country = elgg_echo("timezone:country:$country_code");
		$tzinfo->region = $region;
		$tzinfo->offset = $dt->getOffset();
		$tzinfo->gmt = $dt->format('\(\G\M\TP\)');

		$name = "timezone:name:$tzinfo->country_code:$tzinfo->abbr";
		$name_tr = elgg_echo($name);
		$tzinfo->name = ($name == $name_tr) ? $tzinfo->abbr : $name_tr;
		$tzinfo->label = "$tzinfo->gmt $tzinfo->name - $tzinfo->region";

		return $tzinfo;
	}
447704
public function getUsersActiveTimer($user_id)
    {
        $result = $this->getUserEntries( $user_id, Range::today( $this->_timeZone ) );
        if ( $result->isSuccess() ) {
            $data = null;
            foreach ($result->data as $entry) {
                if ($entry->timer_started_at != null || $entry->timer_started_at != "") {
                    $data = $entry;
                    break;
                }
            }
            $result->data = $data;
        }

        return $result;
    }
910970
public function getDatabaseTimezoneName()
    {
        if ($this->databaseTimezoneName === null) {
            $this->databaseTimezoneName = $this->connection->fetchColumn('select @@time_zone') ?: '';
        }

        return $this->databaseTimezoneName;
    }
1036868
private static TimeZone getCustomTimeZone(String id) {
        Matcher m = NoImagePreloadHolder.CUSTOM_ZONE_ID_PATTERN.matcher(id);
        if (!m.matches()) {
            return null;
        }

        int hour;
        int minute = 0;
        try {
            hour = Integer.parseInt(m.group(1));
            if (m.group(3) != null) {
                minute = Integer.parseInt(m.group(3));
            }
        } catch (NumberFormatException impossible) {
            throw new AssertionError(impossible);
        }

        if (hour < 0 || hour > 23 || minute < 0 || minute > 59) {
            return null;
        }

        char sign = id.charAt(3);
        int raw = (hour * 3600000) + (minute * 60000);
        if (sign == '-') {
            raw = -raw;
        }

        String cleanId = String.format(Locale.ROOT, "GMT%c%02d:%02d", sign, hour, minute);

        return new SimpleTimeZone(raw, cleanId);
    }
358506
public static function getTimeZones(): array
	{
		$timeZones = [];

		foreach(static::listIdentifiers() as $timeZone)
		{
			$timeZones[$timeZone] = str_replace('_', ' ', $timeZone);
		}

		return $timeZones;
	}