Return an array of timeunints

@return array of timeunits
191672
protected function getTimearray()
    {
        $intSeconds = abs($this->intSeconds);

        $intYears = floor($intSeconds / DateTimeSpan::SECONDS_PER_YEAR);
        $intSeconds = $intSeconds - ($intYears * DateTimeSpan::SECONDS_PER_YEAR);

        $intMonths = floor($intSeconds / DateTimeSpan::SECONDS_PER_MONTH);
        $intSeconds = $intSeconds - ($intMonths * DateTimeSpan::SECONDS_PER_MONTH);

        $intDays = floor($intSeconds / DateTimeSpan::SECONDS_PER_DAY);
        $intSeconds = $intSeconds - ($intDays * DateTimeSpan::SECONDS_PER_DAY);

        $intHours = floor($intSeconds / DateTimeSpan::SECONDS_PER_HOUR);
        $intSeconds = $intSeconds - ($intHours * DateTimeSpan::SECONDS_PER_HOUR);

        $intMinutes = floor($intSeconds / DateTimeSpan::SECONDS_PER_MINUTE);
        $intSeconds = $intSeconds - ($intMinutes * DateTimeSpan::SECONDS_PER_MINUTE);

        if ($this->isNegative()) {
            // Turn values to negative
            $intYears = ((-1) * $intYears);
            $intMonths = ((-1) * $intMonths);
            $intDays = ((-1) * $intDays);
            $intHours = ((-1) * $intHours);
            $intMinutes = ((-1) * $intMinutes);
            $intSeconds = ((-1) * $intSeconds);
        }

        return array(
            'Years' => $intYears,
            'Months' => $intMonths,
            'Days' => $intDays,
            'Hours' => $intHours,
            'Minutes' => $intMinutes,
            'Seconds' => $intSeconds
        );
    }
958883
private static function getTimezones(): array
    {
        $timezones = [];

        foreach (\DateTimeZone::listIdentifiers() as $timezone) {
            $parts = explode('/', $timezone);

            if (\count($parts) > 2) {
                $region = $parts[0];
                $name = $parts[1].' - '.$parts[2];
            } elseif (\count($parts) > 1) {
                $region = $parts[0];
                $name = $parts[1];
            } else {
                $region = 'Other';
                $name = $parts[0];
            }

            $timezones[$region][str_replace('_', ' ', $name)] = $timezone;
        }

        return $timezones;
    }
861758
public function getTimestamp()
    {
        $name = $this->name;
        $this->timestamp = $this->resource->getTimestamp($name, $this->sdopx);
        return $this->timestamp;
    }
679504
function getTimezoneList() {

		$regions = [
			\DateTimeZone::AFRICA,
			\DateTimeZone::AMERICA,
			\DateTimeZone::ANTARCTICA,
			\DateTimeZone::ASIA,
			\DateTimeZone::ATLANTIC,
			\DateTimeZone::AUSTRALIA,
			\DateTimeZone::EUROPE,
			\DateTimeZone::INDIAN,
			\DateTimeZone::PACIFIC,
		];

		$timezones = array();

		foreach( $regions as $region ) {

			$timezones = array_merge( $timezones, \DateTimeZone::listIdentifiers( $region ) );
		}

		$timezone_offsets = array();

		foreach( $timezones as $timezone ) {

			$tz = new \DateTimeZone( $timezone );

			$timezone_offsets[$timezone] = $tz->getOffset( new DateTime );
		}

		// sort timezone by offset
		asort( $timezone_offsets );

		$timezone_list = array();

		foreach( $timezone_offsets as $timezone => $offset ) {

			$offset_prefix		= $offset < 0 ? '-' : '+';
			$offset_formatted 	= gmdate( 'H:i', abs($offset) );

			$pretty_offset 		= "UTC${offset_prefix}${offset_formatted}";

			$timezone_list[$timezone] = "(${pretty_offset}) $timezone";
		}

		return $timezone_list;
	}
611767
public function toArray(): array
    {
        return [
            'time_low'                  => $this->timeLow,
            'time_mid'                  => $this->timeMid,
            'time_hi_and_version'       => $this->timeHiAndVersion,
            'clock_seq_hi_and_reserved' => $this->clockSeqHiAndReserved,
            'clock_seq_low'             => $this->clockSeqLow,
            'node'                      => $this->node
        ];
    }
634868
public static function getAll()
    {
        $timeZones = [];
        $timeZoneIdentifiers = \DateTimeZone::listIdentifiers();

        foreach ($timeZoneIdentifiers as $timeZone) {
            $date = new \DateTime('now', new \DateTimeZone($timeZone));
            $offset = $date->getOffset();
            $tz = ($offset > 0 ? '+' : '-') . gmdate('H:i', abs($offset));
            $timeZones[] = [
                'timezone' => $timeZone,
                'name' => "{$timeZone} (UTC {$tz})",
                'offset' => $offset
            ];
        }

        \yii\helpers\ArrayHelper::multisort($timeZones, 'offset', SORT_DESC, SORT_NUMERIC);

        return $timeZones;
    }
379518
public static function getTimeZoneList(): array
    {
        $timeZoneList = [];
        foreach (DateTimeZone::listIdentifiers() as $timeZone) {
            [$region, $name] = self::parseTimeZone($timeZone);

            $offset = self::buildOffsetString($timeZone);
            $name = sprintf('%s (%s)', str_replace('_', ' ', $name), $offset);

            $timeZoneList[$region][$name] = $timeZone;
        }

        return $timeZoneList;
    }
545096
private String[] getTimePatterns(ProjectProperties properties)
   {
      String[] result;
      char timesep = properties.getTimeSeparator();
      ProjectTimeFormat format = properties.getTimeFormat();

      if (format == null || format == ProjectTimeFormat.TWELVE_HOUR)
      {
         result = new String[]
         {
            "hh" + timesep + "mm a",
            "hh" + timesep + "mma"
         };
      }
      else
      {
         result = new String[]
         {
            "HH" + timesep + "mm",
            "HH",
         };
      }

      return result;
   }
41422
public function getAll() : array
    {
        $convertedClaims = [];
        $timeFields = ['exp', 'nbf', 'iat'];

        // Convert date times to timestamps
        foreach ($this->claims as $name => $value) {
            if ($value !== null && in_array($name, $timeFields)) {
                /** @var DateTimeImmutable $value */
                $value = $value->getTimestamp();
            }

            $convertedClaims[$name] = $value;
        }

        if (!isset($this->claims['jti'])) {
            $convertedClaims['jti'] = $this->getId();
        }

        return $convertedClaims;
    }
170144
public function getTimestamp()
    {
        if (!isset($this->data['ts'])) {
            return null;
        }

        $time = new \DateTime();
        $time->setTimestamp($this->data['ts']);
        return $time;
    }
36432
public static function getGroupedTimeZones(): array
	{
		$timeZones = [];

		foreach(static::listIdentifiers() as $timeZone)
		{
			[$group, $city] = explode('/', $timeZone, 2) + [null, null];

			$timeZones[$group][$timeZone] = str_replace('_', ' ', $city);
		}

		unset($timeZones['UTC']);

		return $timeZones;
	}
940986
public com.google.api.ads.admanager.axis.v201808.TimeUnit getTimeUnit() {
        return timeUnit;
    }
316482
public function getTimezones()
    {
        static $cache = [];
        $locale = Localization::activeLocale();
        if (array_key_exists($locale, $cache)) {
            $result = $cache[$locale];
        } else {
            $result = [];
            $continentNames = [
                'Africa' => \Punic\Territory::getName('002'),
                'Asia' => \Punic\Territory::getName('142'),
                'America' => \Punic\Territory::getName('019'),
                'Antarctica' => \Punic\Territory::getName('AQ'),
                'Arctic' => t('Arctic'),
                'Atlantic' => t('Atlantic Ocean'),
                'Australia' => \Punic\Territory::getName('AU'),
                'Europe' => \Punic\Territory::getName('150'),
                'Indian' => t('Indian Ocean'),
                'Pacific' => t('Pacific Ocean'),
            ];
            foreach (\DateTimeZone::listIdentifiers() as $timezoneID) {
                switch ($timezoneID) {
                    case 'UTC':
                    case 'GMT':
                        $timezoneName = t(/*i18n: %s is an acronym like UTC, GMT, ... */'Greenwich Mean Time (%s)', $timezoneID);
                        break;
                    default:
                        $chunks = explode('/', $timezoneID);
                        if (array_key_exists($chunks[0], $continentNames)) {
                            $chunks[0] = $continentNames[$chunks[0]];
                        }
                        if (count($chunks) > 0) {
                            $city = Calendar::getTimezoneExemplarCity($timezoneID, false);
                            if (!strlen($city)) {
                                switch ($timezoneID) {
                                    case 'America/Fort_Nelson':
                                        $city = tc(/*i18n: Canadian territory */'Territory', 'Fort Nelson');
                                        break;
                                    case 'America/Montreal':
                                        $city = tc(/*i18n: Canadian city */'Territory', 'Montreal');
                                        break;
                                    case 'America/Shiprock':
                                        $city = tc(/*i18n: Territory in New Mexico (USA) */'Territory', 'Shiprock');
                                        break;
                                    case 'Antarctica/South_Pole':
                                        $city = tc(/*i18n: The South Pole */'Territory', 'South Pole');
                                        break;
                                    case 'Asia/Atyrau':
                                        $city = tc(/*i18n: Kazakh territory */'Territory', 'Atyrau');
                                        break;
                                    case 'Asia/Barnaul':
                                        $city = tc(/*i18n: Russian city */'Territory', 'Barnaul');
                                        break;
                                    case 'Asia/Famagusta':
                                        $city = tc(/*i18n: City in Cyprus Island */'Territory', 'Famagusta');
                                        break;
                                    case 'Asia/Tomsk':
                                        $city = tc(/*i18n: Russian city */'Territory', 'Tomsk');
                                        break;
                                    case 'Asia/Yangon':
                                        $city = tc(/*i18n: Burmese city */'Territory', 'Yangon');
                                        break;
                                    case 'Europe/Astrakhan':
                                        $city = tc(/*i18n: Russian city */'Territory', 'Astrakhan');
                                        break;
                                    case 'Europe/Kirov':
                                        $city = tc(/*i18n: Russian city */'Territory', 'Kirov');
                                        break;
                                    case 'Europe/Saratov':
                                        $city = tc(/*i18n: Russian city */'Territory', 'Saratov');
                                        break;
                                    case 'Europe/Ulyanovsk':
                                        $city = tc(/*i18n: Russian city */'Territory', 'Ulyanovsk');
                                        break;
                                }
                            }
                            if (strlen($city)) {
                                $chunks = [$chunks[0], $city];
                            }
                        }
                        $timezoneName = implode('/', $chunks);
                        break;
                }
                $result[$timezoneID] = $timezoneName;
            }
            $comparer = new Comparer();
            $comparer->sort($result, true);
            $cache[$locale] = $result;
        }

        return $result;
    }
561341
protected function getTimestampedTraitHooks(): array
	{
		return
		[
			'beforeInsert' =>
			[
				function(array $values, $query): array
				{
					$dateTime = new DateTime;

					$createdAtColumn = $this->getCreatedAtColumn();

					$updatedAtColumn = $this->getUpdatedAtColumn();

					$this->columns[$createdAtColumn] = $dateTime;

					$this->columns[$updatedAtColumn] = $dateTime;

					return [$createdAtColumn => $dateTime, $updatedAtColumn => $dateTime] + $values;
				},
			],
			'afterInsert' =>
			[
				function($inserted): void
				{
					if($this->shouldTouchOnInsert() && $inserted && $this->isPersisted)
					{
						$this->touchRelated();
					}
				},
			],
			'beforeUpdate' =>
			[
				function(array $values, $query): array
				{
					$dateTime = new DateTime;

					$updatedAtColumn = $this->getUpdatedAtColumn();

					$this->columns[$updatedAtColumn] = $dateTime;

					return [$updatedAtColumn => $dateTime] + $values;
				},
			],
			'afterUpdate' =>
			[
				function($updated): void
				{
					if($this->shouldTouchOnUpdate() && $updated > 0 && $this->isPersisted)
					{
						$this->touchRelated();
					}
				},
			],
			'afterDelete' =>
			[
				function($deleted): void
				{
					if($this->shouldTouchOnDelete() && $deleted > 0 && $this->isPersisted)
					{
						$this->touchRelated();
					}
				},
			],
		];
	}
551418
public function getAvailableIDs(): array
    {
        if ($this->availableTz === null) {
            $this->availableTz = [];
            $available = $this->timeZoneClass->getAvailableIDs();
            foreach ($available as $id) {
                $this->availableTz[] = $id;
            }
        }

        return $this->availableTz;
    }
697022
public function getRuntimeEvaluationsDefinition(): array
    {
        if ($this->pointcut === null) {
            $this->pointcut = $this->proxyClassBuilder->findPointcut($this->aspectClassName, $this->pointcutMethodName);
        }
        if ($this->pointcut === false) {
            return [];
        }

        return $this->pointcut->getRuntimeEvaluationsDefinition();
    }
938987
private static function getMinutes(): array
    {
        $minutes = [-1 => static::getConstant('TXT_DATETIME_II', 'TXT_DATETIME_II')];
        for ($i = 0; $i <= 59; $i++) {
            $minutes[$i] = \sprintf('%02s', $i);
        }
        return $minutes;
    }