Set the unix timestamp for which the cookie will expire

@param int $timestamp Unix timestamp

@return self
346317
public function setExpires($timestamp)
    {
        $this->data['Expires'] = is_numeric($timestamp)
            ? (int) $timestamp
            : strtotime($timestamp);

        return $this;
    }
465864
public function setMicrotimeAsFloat($timestamp)
    {
        if (!is_numeric($timestamp)) {
            throw new \InvalidArgumentException("Timestamp should be numeric");
        }
        $converter = new MicrotimeConverter();
        $this->timestamp = $converter->convertFloatToString($timestamp);
    }
989844
public function expiresAfter($time)
    {
        $this->expiration = new \DateTime();
        if (is_int($time)) {
            if ($time < 0) {
                $time = new \DateInterval('PT' . abs($time) . 'S');
                $time->invert = 1;
            } else {
                $time = new \DateInterval('PT' . $time . 'S');
            }
        }
        $this->expiration->add($time);
        $this->changed = true;
        return $this;
    }
549292
public static function createDateTimeFromTimestampWithMilliseconds($timestamp)
    {
        // manage negative timestamps (before unix epoch)
        if ($timestamp < 0) {
            $datetime = new \DateTime();
            $datetime = $datetime->setTimestamp($timestamp);
        } else {
            $datetime = \DateTime::createFromFormat('U.u', $timestamp, new \DateTimeZone('UTC'));

            if ($datetime == false) {
                $datetime = \DateTime::createFromFormat('U', $timestamp, new \DateTimeZone('UTC'));
            }
        }

        if ($datetime == false) {
            throw new \RuntimeException(
                sprintf('Could not create datetime from "%s": %s',
                    $timestamp,
                    print_r(\DateTime::getLastErrors(), true)
                )
            );
        }

        return $datetime;
    }
307104
public function setTtl(int $seconds): self
    {
        $this->setSharedMaxAge($this->getAge() + $seconds);

        return $this;
    }
11321
private function timestampHasExpired($timestamp) {
        $year   = substr($timestamp, 0, 4);
        $month  = substr($timestamp, 5, 2);
        $day    = substr($timestamp, 8, 2);
        $hour   = substr($timestamp, 11, 2);
        $minute = substr($timestamp, 14, 2);
        $second = substr($timestamp, 17, 2);

        $timestamp = gmmktime($hour, $minute, $second, $month, $day, $year);

        $diff = time() - $timestamp;

        if ($diff > $this->maxDiff || $diff < -$this->maxDiff) {
            return true;
        }

        return false;
    }
689354
public function setExpirationMonth($expirationMonth)
    {
        $this->expirationMonth = $expirationMonth === null ? null : (int) $expirationMonth;

        return $this;
    }
48007
protected function setTimestamp($addCreated = 0, $addExpires = 0)
    {
        $timestampValue = $this->getPassword()->getTimestampValue();
        if ($addCreated && $addExpires && $timestampValue) {
            $timestamp = new Timestamp();
            $timestamp->setCreated(new Created($timestampValue));
            $timestamp->setExpires(new Expires($timestampValue, $addExpires));
            $this->security->setTimestamp($timestamp);
        }

        return $this;
    }
353586
public function expireat($key, $timestamp)
    {
        $this->init();
        $result = $this->driver->expireat($key, $timestamp);
        return (bool)$result;
    }
570791
public function setTimestamp($timestamp)
    {
        try {
            $this->getDateObject()->setTimestamp($timestamp);
        } catch (\Exception $e) {
            throw new DateTimeObjectException($e->getMessage());
        }

        return $this;
    }
380385
public function setTimestamp( $timestamp ) {
		$instance = parent::setTimestamp( $timestamp );
		list(
			$instance->arYear,
			$instance->arMonth,
			$instance->arDay
			) = ( new Date() )->hjConvert( $instance->year, $instance->month, $instance->day );
		
		return $instance;
	}
270109
public function set_timestamp($ts = null)
    {
        if (!is_numeric($ts)) {
            $this->time = null;
            $this->adate = null;
            return $this;
        }
        
        $old_year = ($this->time == null) ? false : $this->adate['year'];
        
        $this->time = $ts;
        $this->adate = getdate($ts);
        
        $this->adate['daysInMonth'] = date('t', $ts);
        
        //Test si on doit recalculer les jours fériés
        if ($old_year === false || $old_year != $this->adate['year']) {
            $this->set_joursferies($this->adate['year']);
        }
        
        return $this;
    }
667163
public function setExpire($expire)
    {
        if (!$expire instanceof DateTime) {
            if (is_integer($expire)) {
                $expire = (new DateTime())->setTimestamp($expire);
            } else {
                $expire = new DateTime($expire);
            }
        }
        $this->expire = $expire;

        return $this;
    }
373073
public function setClientTtl(int $seconds): self
    {
        $this->setMaxAge($this->getAge() + $seconds);

        return $this;
    }
858142
private static function _timestampToUTC($timestamp)
    {
        $tz = new DateTimeZone('UTC');
        $dateTime = new DateTime($timestamp, $tz);
        $dateTime->setTimezone($tz);
        return $dateTime;
    }
1149036
private function check_timestamp($timestamp)
    {
        if( ! $timestamp )
            throw new Exception(
                'Missing timestamp parameter. The parameter is required'
            );

        // verify that timestamp is recentish
        $now = time();
        if (abs($now - $timestamp) > $this->timestamp_threshold) {
            throw new Exception(
                "Expired timestamp, yours $timestamp, ours $now"
            );
        }
    }
41156
public function setExpire($expire) : self
    {
        // convert expiration time to a Unix timestamp
        if ($expire instanceof \DateTime || $expire instanceof \DateTimeImmutable) {
            $expire = (int) $expire->format('U');
        } elseif (!is_numeric($expire) || !is_int($expire)) {
            throw new \InvalidArgumentException(sprintf(
                "The cookie expiration time is not valid with type '%s'",
                gettype($expire)
            ));
        } elseif ($expire > 0) {
            $expire = time() + $expire;
        }

        $this->expire = $expire;

        return $this;
    }