Returns hours array

@return array
509419
private static function getHours(): array
    {
        $hours = [-1 => static::getConstant('TXT_DATETIME_HH', 'TXT_DATETIME_HH')];
        for ($i = 0; $i <= 23; $i++) {
            $hours[$i] = \sprintf('%02s', $i);
        }
        return $hours;
    }
1264620
protected function getDates()
    {
        $date = new \DateTime ( "now" );
        $date->setTimezone ( new \DateTimeZone ( "America/Sao_Paulo" ) );

        $final = $date->format ( "Y-m-d\TH:i:s" );

        $dateInterval = "P" . ( string ) $this->_days . "D";
        $date->sub ( new \DateInterval ( $dateInterval ) );
        $date->setTime ( 00, 00, 00 );
        $initial = $date->format ( "Y-m-d\TH:i:s" );

        return [
            'initial' => $initial,
            'final'   => $final
        ];
    }
358506
public static function getTimeZones(): array
	{
		$timeZones = [];

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

		return $timeZones;
	}
948716
public function toArray()
    {
        $list = [];

        // Add popular timezones to list
        foreach ($this->popularTimezones as $key => $value) {
            $list['General'][$key] = $value;
        }

        // Add all timezone of continents to list
        foreach ($this->continents as $continent => $mask) {
            $timezones = DateTimeZone::listIdentifiers($mask);
            foreach ($timezones as $timezone) {
                $list[$continent][$timezone] = $this->formatTimezone($timezone, $continent);
            }
        }

        return $list;
    }
1181073
public function getAllTimeFormatFlat()
    {
        $aOut     = [];
        $aFormats = $this->getAllTimeFormat();

        foreach ($aFormats as $oFormat) {
            $aOut[$oFormat->slug] = $oFormat->label;
        }

        return $aOut;
    }
626929
public function getEntries()
    {
        return array(
            $this->getMinute(),
            $this->getHour(),
            $this->getDayOfMonth(),
            $this->getMonth(),
            $this->getDayOfWeek(),
            $this->getCommand(),
            $this->prepareLog(),
            $this->prepareError(),
            $this->prepareComments(),
        );
    }
887357
public function HourOffset() {
      static $GuestHourOffset;
      
      if ($this->UserID > 0) {
         return $this->User->HourOffset;
      } else {
         if (!isset($GuestHourOffset)) {
            $GuestTimeZone = C('Garden.GuestTimeZone');
            if ($GuestTimeZone) {
               try {
                  $TimeZone = new DateTimeZone($GuestTimeZone);
                  $Offset = $TimeZone->getOffset(new DateTime('now', new DateTimeZone('UTC')));
                  $GuestHourOffset = floor($Offset / 3600);
               } catch (Exception $Ex) {
                  $GuestHourOffset = 0;
                  LogException($Ex);
               }
            }
         }
         
         return $GuestHourOffset;
      }
   }
1101495
public function getMembers()
    {
        $time = [];

        $seconds = abs($this->getSeconds());

        $time['hours'] = floor($seconds / 3600);

        $time['minutes'] = floor(($seconds - ($time['hours'] * 3600)) / 60);

        $time['seconds'] = floor($seconds % 60);

        $time['total_minutes'] = ($time['hours'] * 60) + $time['minutes'];

        return $time;

    }
1088770
public function toArray()
    {
        $result = [];
        $result['id']            = $this->id;
        $result['toUserName']    = $this->toUserName;
        $result['fromUserName']  = $this->fromUserName;
        $result['createTime']    = $this->createTime;
        $result['msgType']       = $this->msgType;
        return $result;
    }
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;
    }
639883
public static function getAll()
    {
        $timezones = [];
        $identifiers = DateTimeZone::listIdentifiers();
        foreach ($identifiers as $identifier) {
            $date = new DateTime("now", new DateTimeZone($identifier));
            $offsetText = $date->format("P");
            $offsetInHours = $date->getOffset() / 60 / 60;
            $timezones[] = [
                "identifier" => $identifier,
                "name" => "(GMT{$offsetText}) $identifier",
                "offset" => $offsetInHours
            ];
        }

        ArrayHelper::multisort($timezones, "offset", SORT_ASC, SORT_NUMERIC);
        return $timezones;
    }
166921
public static function hoursAgo()
    {
        return self::getOrCreate('hours-ago', function () {
            return RangeRule::createForNegativeValues(Unit::HOUR, Unit::DAY - 1, [Results::class, 'calculateHoursAgo']);
        });
    }
1196710
public function getQueryParameters() {
        $params = array();
        $params['itemType'] = $this->item_type;
        $params['itemId'] = $this->item_id;
        $params['time'] = $this->time;
        return $params;
    }
320933
public function toArray()
	{
		$array = array();
		for( $i=$this->interval->getStart(); $i<$this->interval->getEnd(); $i++ )
		{
			$value = $this->getPartialSum( $this->interval->getStart(), $i );
			$array[$i] = $value;
		}
		return $array;
	}
742998
public function getExecTasks(): array
    {
        $data = [];
        $runTimeTableTasks = $this->getRunTimeTable()->table;
        if (\count($runTimeTableTasks) <= 0) {
            return $data;
        }

        $min = date('YmdHi');

        foreach ($runTimeTableTasks as $key => $value) {
            if ($value['minute'] == $min) {
                if (time() == $value['sec'] && $value['runStatus'] == self::NORMAL) {
                    $data[] = [
                        'key'        => $key,
                        'taskClass'  => $value['taskClass'],
                        'taskMethod' => $value['taskMethod'],
                    ];
                }
            }
        }

        foreach ($data as $item) {
            $this->startTask($item['key']);
        }

        return $data;
    }
644361
public function getLoad()
    {
        if (!empty($this->settings['timer'])) {
            $t = new Timer('Load Averages');
        }

        $parts = explode(' ', trim($this->sysctl['vm.loadavg']));

        if (!$parts) {
            return [];
        }

        return array_combine(array('now', '5min', '15min'), $parts);
    }
614350
public function toArray()
    {
        if ($this->timer !== null) {
            $this->values['elapsed-time'] = $this->timer->getElapsedTime(true);
        }

        return $this->values;
    }