Get the cookie lifetime in seconds.

@return \DateTimeInterface|int
513952
protected function getCookieExpirationDate()
    {
        $config = $this->manager->getSessionConfig();

        return $config['expire_on_close'] ? 0 : Date::instance(
            Carbon::now()->addRealMinutes($config['lifetime'])
        );
    }
131853
protected function getCookieExpirationDate()
    {
        if (!empty($this->config['expire_on_close'])) {
            $expirationDate = 0;
        } else {
            $expirationDate = Carbon::now()->addMinutes(5 * 60);
        }
        return $expirationDate;
    }
831144
public  function isExpired(){
        $now = new DateTime(gmdate('Y-m-d H:i:s'));
        $expire = new Datetime($this->expiry_dtime);
        return $now >= $expire;
    }
218838
public function get()
    {
        if (! Cookie::has($this->key)) {
            Cookie::queue($this->key, $uniqueString = $this->generateUniqueString(), $this->expirationInMinutes());

            return $uniqueString;
        }

        return Cookie::get($this->key);
    }
174289
public function toSeconds()
    {
        $seconds = $this->s;
        $seconds += $this->i * 60;
        $seconds += $this->h * 3600;
        
        if ($this->days) {
            $seconds += $this->days * 86400;
        } else {
            if ($this->d) {
                $seconds += $this->d * 86400;
            }
            if ($this->m) {
                trigger_error('Calculating seconds for interval with months property. Result may not be accurate.', E_USER_WARNING);
                $seconds += 2629800;
            }
            if ($this->y) {
                trigger_error('Calculating seconds for interval with years property. Result may not be accurate.', E_USER_WARNING);
                $seconds += $this->y * 31557600;
            }
        }
        return $seconds;
    }
60499
public function getExpire()
    {
        if ($this->expire instanceof DateTimeInterface) {
            return $this->expire;
        }

        return $this->expire ? $this->expire - time() : null;
    }
704163
public function getCacheLifetime()
    {
        $lifetime = $this->getContainer('config')->get('rinvex.repository.cache.lifetime');

        // Return value even if it's zero "0" (which means cache is disabled)
        return ! is_null($this->cacheLifetime) ? $this->cacheLifetime : $lifetime;
    }
1091817
public static function getLastRunTime()
    {
        $timestamp = Option::get(self::LAST_RUN_TIME_OPTION_NAME);
        return $timestamp === false ? false : Date::factory((int)$timestamp);
    }
554540
protected function getYears()
    {
        $intSecondsPerYear = ($this->isPositive()) ? DateTimeSpan::SECONDS_PER_YEAR : ((-1) * DateTimeSpan::SECONDS_PER_YEAR);
        $intYears = floor($this->intSeconds / $intSecondsPerYear);
        if ($this->isNegative()) {
            $intYears = (-1) * $intYears;
        }
        return $intYears;
    }
995535
public function getTotalSeconds()
	{
		$dt = new \DateTimeImmutable();
		$seconds = $dt->getTimestamp();
		$result = new DecimalValue( $dt->add( $this->Value )->getTimestamp() - $seconds );
		$result = $result->Add( ( $this->Value->invert ? "-" : "" ) . "0.{$this->Value->microseconds}" );
		if ( $this->Value->invert )
		{
			// $result = $result->Mul( -1 );
		}
		return $result;
	}
726183
public function getTime()
    {
        // Time should only be used with the history state.
        if (!$this->isHistory()) {
            return new DateTime('now');
        }

        $timestamp = $this->session->get($this->timePersistenceKey, time());

        return (new DateTime())->setTimestamp($timestamp);
    }
1186261
protected function resolveCacheLifetime($lifetime): DateTime
    {
        if ($lifetime instanceof DateTime) {
            return $lifetime;
        }

        if (is_int($lifetime)) {
            return Carbon::now()->addMinutes($lifetime);
        }
    }
729091
public function getLastModified()
	{
		if ($this->lastModified == null) {
			$this->requestHead();
		}
		return $this->lastModified == null ? new \DateTime() : $this->lastModified;
	}
624982
public function getExpiresInterval()
    {
        if (!$this->expiresAt) return '';
        $now = new \DateTime();
        $interval = $now->diff($this->expiresAt);
        if ($interval->days == 1)
            return $interval->format('%a jour');
        elseif ($interval->days > 1)
            return $interval->format('%a jours');
        elseif ($interval->h == 1)
            return $interval->format('%h heure');
        else
            return $interval->format('%h heures');
    }
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;
	}
1125030
public function getDuration()
    {
        if ($this->duration === null) {
            $match = [];
            preg_match(self::$REGEX_DURATION, $this->output, $match);
            if (array_key_exists(1, $match) && array_key_exists(2, $match) && array_key_exists(3, $match)) {
                $hours = (int)$match[1];
                $minutes = (int)$match[2];
                $seconds = (int)$match[3];
                $fractions = (float)(array_key_exists(5, $match) ? '0.'.$match[5] : 0.0);

                $this->duration = (($hours * 3600) + ($minutes * 60) + $seconds + $fractions);
            } else {
                $this->duration = 0.0;
            }

            return $this->duration;
        }

        return $this->duration;
    }
879910
public function getTempoAtendimento()
    {
        if ($this->tempoAtendimento) {
            return $this->secondsToDateInterval($this->tempoAtendimento);
        }
        
        $interval = new DateInterval('P0M');
        if ($this->getDataFim()) {
            $interval = $this->getDataFim()->diff($this->getDataInicio());
        }

        return $interval;
    }