Get the usage case by comparing two hours.
@return string
768167
private function getTimeCase()
    {
        $from = $this->from;
        $to = $this->to;

        // Single hour event
        if (!$to || $to->format('Hi') === $from->format('Hi')) {
            if ($to->format('i') == 0) {
                return 'single_round';
            }

            return 'single';
        }

        $fromTime = [
            'hour'   => $from->format('H'),
            'minute' => $from->format('i'),
        ];

        $toTime = [
            'hour'   => $to->format('H'),
            'minute' => $to->format('i'),
        ];

        $case = null;
        $case = $fromTime['hour'] !== $toTime['hour'] ? 'different_time' : $case;
        $case = $fromTime['minute'] == 0 ? 'different_time_round' : $case;
        $case = $fromTime['minute'] != $toTime['minute'] ? 'different_time' : $case;

        return $case;
    }
837524
public function usage()
    {
        $name = (strlen($this->_short) > 0) ? ('-' . $this->_short) : ('--' . $this->_name);
        $default = '';
        if (strlen($this->_default) > 0 && $this->_default !== true) {
            $default = ' ' . $this->_default;
        }
        if ($this->_choices) {
            $default = ' ' . implode('|', $this->_choices);
        }

        return sprintf('[%s%s]', $name, $default);
    }
771042
protected function get12hHour() : int
   {

      if ( $this->isAnteMeridiem() )
      {
         return $this->getHour();
      }

      if ( $this->properties[ 'hour' ] == 0 )
      {
         return 12;
      }

      if ( $this->properties[ 'hour' ] > 12 )
      {
         return $this->properties[ 'hour' ] - 12;
      }

      return $this->properties[ 'hour' ];

   }
1314056
public function getRescheduledTime()
    {
        $currentTime = $this->getTime();

        // Add one day
        $rescheduledTime = mktime(date('H', $currentTime),
            date('i', $currentTime),
            date('s', $currentTime),
            date('n', $currentTime),
            date('j', $currentTime) + 1,
            date('Y', $currentTime)
        );

        // Adjusts the scheduled hour
        $rescheduledTime = $this->adjustHour($rescheduledTime);
        $rescheduledTime = $this->adjustTimezone($rescheduledTime);

        return $rescheduledTime;
    }
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;
      }
   }
426979
public function getLastAccessedAt() {
		$timestamp = fileatime($this->pathname);
		$time = new DateTime();
		$time->setTimestamp($timestamp);
		return $time;
	}
1302884
public function expected_time() {
        $filetime = portfolio_expected_time_file($this->multifiles);
        $dbtime   = portfolio_expected_time_db(count($this->exportdata['entries']));
        return ($filetime > $dbtime) ? $filetime : $dbtime;
    }
414689
public static function getMemoryUsage()
    {
        $memory = false;
        if (function_exists('xdebug_memory_usage')) {
            $memory = xdebug_memory_usage();
        } elseif (function_exists('memory_get_usage')) {
            $memory = memory_get_usage();
        }
        if ($memory === false) {
            return "Memory usage function not found.";
        }
        $usage = number_format(round($memory / 1024 / 1024, 2), 2);
        return "$usage Mb";
    }
1104921
public static function time()
    {
        if (!is_null(self::$_now)) {
            if (is_int(self::$_now)) {
                return self::$_now;
            }

            return strtotime(self::$_now);
        }

        return time();
    }
739476
public function getRemainingSuspensionTime()
	{
		if(!$this->isSuspended())
			return 0;

		$lastAttempt = clone $this->last_attempt_at;

		$suspensionTime  = static::$suspensionTime;
		$clearAttemptsAt = $lastAttempt->modify("+{$suspensionTime} minutes");
		$now             = new Datetime;

		$timeLeft = $clearAttemptsAt->diff($now);

		$minutesLeft = ($timeLeft->s != 0 ?
						($timeLeft->days * 24 * 60) + ($timeLeft->h * 60) + ($timeLeft->i) + 1 :
						($timeLeft->days * 24 * 60) + ($timeLeft->h * 60) + ($timeLeft->i));

		return $minutesLeft;
	}
539683
public function getCurrentTime()
    {
        $config = $this->config;
        $time = $config->time;
        if ($time !== null) {
            if ($config->timeChanging) {
                return $this->__call('time', []) + $time;
            }
            return $time;
        }
        return $this->__call('time', []);
    }
145713
public function getMidnight()
    {
        $formatter = $this->getFrontendFormatter();
        $timestamp = $this->withTimezone($this->getTimezone(), function () {
            return strtotime('midnight');
        });
        return $formatter->format($timestamp);
    }
698174
function convertToHours()
    {
        $totalMinutes = $this->minutes;
        $Mins = ($totalMinutes % 60);
        $Hours = floor(abs($totalMinutes) / 60);
        if ($totalMinutes < 0) {
            $Hours = '-' . $Hours;
            $Mins = substr($Mins, 1);
        } else {
            $Hours = floor($totalMinutes / 60);
        }
        $Mins = str_pad($Mins, 2, '0', STR_PAD_LEFT);
        $this->HM = new HM($Hours, $Mins);

        return $this;
    }
391945
private function newTime()
    {
        $currentHour = date('H');
        $currentMin = date('i');
        $currentSec = date('s');
        $currentMon = date('m');
        $currentDay = date('d');
        $currentYear = date('y');
        return mktime($currentHour, ($currentMin + $_SESSION['session_time']), $currentSec, $currentMon, $currentDay, $currentYear);
    }
1199077
protected function checkTime()
    {
        $result = false;

        $lastExecution = $this->getExecutionTime();
        $interval = $this->getInterval();
        $anonymous = \common_session_SessionManager::isAnonymous();

        if ($lastExecution === null && !$anonymous) {
            $result = true;
        } elseif($lastExecution !== null && $interval !== null && !$anonymous) {
            $mustBeExecutedAt = clone($lastExecution);
            $mustBeExecutedAt->add($interval);
            $now = new DateTime('now');
            $result = ($mustBeExecutedAt < $now);
        }

        return $result;
    }
1238304
public function getValue()
    {
      $value = sprintf("%02d:%02d", $this->hours, $this->minutes);
      
      if(isset($this->seconds))
        $value .= sprintf(":%02d", $this->seconds);
        
      if(isset($this->microtime))
        $value .= substr($this->microtime, 1);
          
      return $value;
    }
83722
public function getBasketTimeLeft()
    {
        if (!isset($this->_dBasketTimeLeft)) {
            $this->_dBasketTimeLeft = $this->getSession()->getBasketReservations()->getTimeLeft();
        }

        return $this->_dBasketTimeLeft;
    }