Returns the internal timezone or the display timezone abbreviation

@return  string
491495
public function get_timezone_abbr($display_timezone = false)
	{
		// determine the timezone to switch to
		$display_timezone and $timezone = static::$display_timezone;
		empty($timezone) and $timezone = $this->timezone;

		// Temporarily change timezone when different from default
		if (\Fuel::$timezone != $timezone)
		{
			date_default_timezone_set($timezone);
		}

		// Create output
		$output = date('T');

		// Change timezone back to default if changed previously
		if (\Fuel::$timezone != $timezone)
		{
			date_default_timezone_set(\Fuel::$timezone);
		}

		return $output;
	}
996096
public static function getDateTime()
    {
        $dt = \DateTime::createFromFormat('U.u', microtime(true));
        $dt->setTimezone(new \DateTimeZone(date('e')));

        return $dt;
    }
604684
public function getEnd() {
		return Util::toISO8601($this->getEndTimestamp(), Util::UTC, $this->getEvent()->getTimezone());
	}
582618
private function getLoggerTime()
    {
        if (! static::$timezone) {
            static::$timezone = new \DateTimeZone(date_default_timezone_get() ? : 'UTC');
        }

        // php7.1+ always has microseconds enabled, so we do not need this hack
        if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) {
            $ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone);
        } else {
            $ts = new \DateTime(null, static::$timezone);
        }

        $ts->setTimezone(static::$timezone);
        return $ts;
    }
1224156
public function getDisplayString()
    {
        $results[] = $this->getAdmissionTime()->toString($this->agenda->appointmentDisplayFormat);
        $results[] = $this->getActivityDescription();
        $results[] = $this->getProcedureDescription();
        $results[] = $this->getLocationDescription();
        $results[] = $this->getSubject();

        return implode($this->_('; '), array_filter($results));
    }
936902
public function getServerTime()
    {
        $response = $this->getConnection()->get(Urls::URL_ADMIN_TIME);
        $data     = $response->getJson();

        return $data['time'];
    }
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;
    }
1227523
public function getTimezoneDisplayName($timezone)
    {
        $displayName = '';
        if (is_object($timezone)) {
            if ($timezone instanceof \DateTimeZone) {
                $displayName = $timezone->getName();
            } elseif ($timezone instanceof \DateTime) {
                $displayName = $timezone->getTimezone()->getName();
            }
        } elseif (is_string($timezone)) {
            $displayName = $timezone;
        }
        if (strlen($displayName) > 0) {
            $timezones = $this->getTimezones();
            if (array_key_exists($displayName, $timezones)) {
                $displayName = $timezones[$displayName];
            }
        }

        return $displayName;
    }
1141522
public String getTimeUnitAbbreviation() {
    switch (timeUnit) {
      case DAYS:
        return "day";
      case HOURS:
        return "hr";
      case MICROSECONDS:
        return "\u00B5s";
      case MILLISECONDS:
        return "ms";
      case MINUTES:
        return "min";
      case NANOSECONDS:
        return "ns";
      case SECONDS:
        return "s";
      default:
        return "unkwn";
    }
  }
189144
private function getCheckTime()
    {
        $checkTime = $this->getConfig()->getSystemConfigParameter('sOnlineLicenseCheckTime');
        if (!$checkTime) {
            $hourToCheck = rand(8, 23);
            $minuteToCheck = rand(0, 59);
            $secondToCheck = rand(0, 59);

            $checkTime = $hourToCheck . ':' . $minuteToCheck . ':' . $secondToCheck;
            $this->getConfig()->saveSystemConfigParameter('str', 'sOnlineLicenseCheckTime', $checkTime);
        }

        return $checkTime;
    }
754135
public function getCurrentTimestamp()
    {
        Deprecated::method(3.3);

        $timezone = $this->get('general/timezone');
        $now = date_format(new \DateTime($timezone), 'Y-m-d H:i:s');

        return $now;
    }
953086
public function getExecutionTime()
    {
        $seconds = $this->getTime() - $this->startTime;

        $seconds = round($seconds);
        if ($seconds < 60) {
            return $seconds . ' sec';
        }
        $minutes = round($seconds / 60);
        $seconds = $seconds % 60;

        return $minutes . ' min ' . $seconds . ' sec';
    }
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;
    }
685374
public function getPHPDateTimePattern()
    {
        $isoFormat = Calendar::getDateTimeFormat('short');
        $result = Calendar::tryConvertIsoToPhpFormat($isoFormat);
        if ($result === null) {
            $result = t(/*i18n: Short date/time format: see http://www.php.net/manual/en/function.date.php */ 'n/j/Y g.i A');
        }

        return $result;
    }
58036
public function formatTZ($format)
    {
        $out = '';

        switch ($format) {
            case self::TZ_ID:
                $out = $this->format('e');
                break;

            case self::TZ_SHORT:
            case self::TZ_LONG:
                $id = $this->format('e');
                $abbreviations = self::getTimeZoneAbbreviations();
                if (
                    isset($abbreviations[$id]) &&
                    isset($abbreviations[$id]['st'])
                ) {
                    $out = $abbreviations[$id]['st'];
                }
                break;

            case self::TZ_DST_SHORT:
            case self::TZ_DST_LONG:
                $id = $this->format('e');
                $abbreviations = self::getTimeZoneAbbreviations();
                if (isset($abbreviations[$id])) {
                    if (isset($abbreviations[$id]['dt'])) {
                        $out = $abbreviations[$id]['dt'];
                    } else {
                        $out = $abbreviations[$id]['st'];
                    }
                }
                break;

            case self::TZ_CURRENT_SHORT:
            case self::TZ_CURRENT_LONG:
                $out = $this->format('T');
                break;

            case self::TZ_COMBINED:
                $out = array();
                $id = $this->format('e');
                $abbreviations = self::getTimeZoneAbbreviations();
                if (isset($abbreviations[$id])) {
                    if (isset($abbreviations[$id]['st'])) {
                        $out[] = $abbreviations[$id]['st'];
                    }
                    if (isset($abbreviations[$id]['dt'])) {
                        $out[] = $abbreviations[$id]['dt'];
                    }
                }
                $out = implode('/', $out);
                break;
        }

        return $out;
    }
553926
private String getDisplayName()
    {
        long hours = TimeUnit.MILLISECONDS.toHours(tz.getRawOffset());
        long minutes = Math.abs(TimeUnit.MILLISECONDS.toMinutes(tz.getRawOffset())
            -TimeUnit.HOURS.toMinutes(hours));
        return String.format("(GMT%+d:%02d) %s", hours, minutes, tz.getID());
    }
696189
private function getTimestamp()
    {
        $zone = date('Z');
        $sign = ($zone < 0) ? '-' : '+';
        $zone = abs($zone);
        $zone = (int)($zone / 3600) * 100 + ($zone % 3600) / 60;
        return sprintf("%s %s%04d", date('D, j M Y H:i:s'), $sign, $zone);
    }