Returns a copy of this ZonedDateTime with the specified period in seconds added.

@param int $seconds

@return ZonedDateTime
423265
public function plusSeconds(int $seconds) : ZonedDateTime
    {
        return ZonedDateTime::of($this->localDateTime->plusSeconds($seconds), $this->timeZone);
    }
1140301
public function setTime($hour, $minute, $second = 0)
    {
        return $this->fixForChaining($this->dateTime->setTime($hour, $minute, $second));
    }
957744
public function getPeriod($period, $mode = self::DAYS_ONLY)
    {
        $result = $this->parsePeriod($period);

        if ($result['max'] && $mode == self::DAYS_AND_TIME) {
            $result['max']->modify("+1 day -1 second");
        }

        foreach ($result as $key => $value) {
            if (!$value) {
                unset($result[$key]);
            } elseif ($mode == self::DAYS_ONLY) {
                $result[$key] = new DateTime($result[$key]->format('Y-m-d'), $this->getTimezoneTo());
            } elseif ($this->getTimezoneTo()) {
                $result[$key]->setTimezone($this->getTimezoneTo());
            }
        }

        return $result;
    }
898132
public function cache($seconds = null)
    {
        if ($seconds === null) {
            $this->cacheTime = $this->defaultCacheTime;
        } elseif ($seconds === false) {
            $this->cacheTime = false;
        } else {
            $this->cacheTime = (int)$seconds;
        }
        return $this;
    }
1351100
public static function getOffsetBySeconds($seconds)
    {
        $tmp    = abs($seconds);
        $hour   = (int) ($tmp / 3600);
        $minute = (int) (($tmp % 3600) / 60);

        $result = $seconds < 0 ? '-' : '+';
        $result.= ($hour < 10  ? '0' . $hour   : $hour) . ':';
        $result.= $minute < 10 ? '0' . $minute : $minute;

        return $result;
    }
378490
public function displayFor(int $seconds)
	{
		$this->options['t'] = $seconds;
		$this->displayFor = $seconds;

		return $this;
	}
1315142
protected static function parse_seconds($seconds) {
        foreach (self::get_units() as $unit => $unused) {
            if ($seconds % $unit === 0) {
                return array('v'=>(int)($seconds/$unit), 'u'=>$unit);
            }
        }
        return array('v'=>(int)$seconds, 'u'=>1);
    }
1353869
public function get($key, $seconds = 60)
    {
        $result = $this->connection()->setnx($key, 1);

        if ($result === 1) {
            $this->connection()->expire($key, $seconds);
        }

        return $result === 1;
    }
733450
public function plusPeriod(Period $period) : ZonedDateTime
    {
        return ZonedDateTime::of($this->localDateTime->plusPeriod($period), $this->timeZone);
    }
1068420
public function wait($seconds = 30) {
        $seconds = max(0, intval($seconds));
        $this->commands = array_merge($this->commands, array("wait" => min($seconds, 30), "total_wait" => $seconds));
        return $this;
    }
583025
private function copy(\DateInterval $interval)
	{
		$copy = new \DateInterval($interval->format('P%yY%mM%dDT%hH%iM%sS'));
		$copy->invert = $interval->invert;

		return $copy;
	}
358119
public function setExpire(int $seconds): bool
    {
        return $this->handle->expire($this->name, $seconds);
    }
1131109
protected function _secondsToHuman($seconds, $format) {
		return (new DateTime('today'))->diff(new DateTime('today +' . (int)$seconds . ' seconds'))->format($format);
	}
560231
public function expiresIn( int $seconds ) : Token
	{
		if ( $seconds > 0 )
		{
			$this->expiry = new DateTimeImmutable( sprintf( '+%d seconds', $seconds ) );

			return $this;
		}

		throw (new InvalidExpiryInterval())->withSeconds( $seconds );
	}
1177348
public function time_hms($seconds)
	{
		$time = '';

		// First pass
		$hours = (int) ($seconds / 3600);
		$seconds = $seconds % 3600;
		$minutes = (int) ($seconds / 60);
		$seconds = $seconds % 60;

		// Cleanup
		$time .= ($hours) ? $hours . ':' : '';
		$time .= ($minutes < 10 && $hours > 0) ? '0' . $minutes : $minutes;
		$time .= ':';
		$time .= ($seconds < 10) ? '0' . $seconds : $seconds;

		return $time;
	}
1047391
public function setExpire(int $seconds) : bool
        {
                return $this->_redis->expire($this->_key, $seconds) > 0 ? true : false;
        }
95508
public function seconds($seconds) {

		if(false === ('-' . intval($seconds) == '-' . $seconds)) {
   			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($seconds)), E_USER_ERROR);
   		}

		$this -> seconds = $seconds;

		return $this;
	}