Sets the new expiration time of the item.

@param string|null $timestamp Expiration time of the item
557815
public function setTimeExpire( $timestamp )
	{
		if( $timestamp !== null )
		{
			$timestamp = (string) $timestamp;
			$this->_checkDateFormat( $timestamp );
		}

		$this->_values['expire'] = $timestamp;
		$this->setModified();
	}
570791
public function setTimestamp($timestamp)
    {
        try {
            $this->getDateObject()->setTimestamp($timestamp);
        } catch (\Exception $e) {
            throw new DateTimeObjectException($e->getMessage());
        }

        return $this;
    }
842433
public function setCreationTimestamp(\AgentSIB\Diadoc\Api\Proto\Timestamp $value = null)
    {
        $this->CreationTimestamp = $value;
    }
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;
    }
454341
public function setExpireAtMilliSeconds(int $timestamp): bool
    {
        return $this->handle->pExpireAt($this->name, $timestamp);
    }
333160
public function setTimestamp($timestamp)
    {
        if (self::$_immutable) {
            self::$_immutable = false;
            $newDate = clone $this;
            $newDate->setTimestamp($timestamp);
            self::$_immutable = true;

            return $newDate;
        } else {
            return parent::setTimestamp($timestamp);
        }
    }
574725
public function setExpirationDate(\Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface $expirationDate)
    {
        $this->expirationDate = $expirationDate;
    }
256235
private function check_timestamp($timestamp)
    {
        if (!$timestamp) {
            throw new Twitter_OAuthException(
                'Missing timestamp parameter. The parameter is required'
            );
        }

        // verify that timestamp is recentish
        $now = time();
        if (abs($now - $timestamp) > $this->timestamp_threshold) {
            throw new Twitter_OAuthException(
                "Expired timestamp, yours $timestamp, ours $now"
            );
        }
    }
754166
public function setUpdaterState($timestamp, $errorcount)
  {
    $this->debugLog('setUpdaterState() called ('.$timestamp.', '.$errorcount.')');
    file_put_contents($this->storage_dir.$this->nextruntime_filename, $timestamp);
    file_put_contents($this->storage_dir.$this->errorcount_filename, $errorcount);
  }
945943
public function expireAt($key, $timestamp, $inMillis = false) {
        $cmd = $inMillis ? 'pexpireat' : 'expireat';

        return $this->send([$cmd, $key, $timestamp], function ($response) {
            return (bool) $response;
        });
    }
965629
public function setExpire(\DateTime $expire = null)
    {
        $this->_expire = ($expire) ? $expire : null;

        return $this;
    }
729947
public function setTimestamp($timestamp = null)
    {
        $this->timestamp = (string)($timestamp ?? $this->modified());

        return $this;
    }
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"
            );
        }
    }
1087525
public function setLastVisit($timestamp = 'now')
	{
		$timestamp = new Date($timestamp);

		$query = $this->getQuery()
			->update($this->getTableName())
			->set(array('lastvisitDate' => $timestamp->toSql()))
			->whereEquals('id', $this->get('id'));

		return $query->execute();
	}
493683
function setTimeOfDay( $timestamp )
    {
        $this->Time = $timestamp % self::SECONDS_A_DAY;
        if ( $this->Time < 0 )
            $this->Time += self::SECONDS_A_DAY;
        $this->IsValid = $this->Time >= 0;
    }
1318433
public function setLastVisit($timestamp = null) {

        // Container
        $container = $this->getContainer();

        // On récupère le table.
        $table = new UserTable($container->get('db'));
        $table->setContainer($container);

        // On met à jour la date.
        return $table->setLastVisit($timestamp, $this->getProperty('id'));
    }
1296430
public function expiresAt($expiration): CacheItemInterface
    {
        if ($expiration === null) {
            $this->expiry = $this->defaultLifetime > 0 ? time() + $this->defaultLifetime : null;
        } elseif ($expiration instanceof DateTimeInterface) {
            $this->expiry = (int) $expiration->format('U');
        } else {
            throw new InvalidArgumentException(sprintf(
                'Expiration date must implement DateTimeInterface or be null, "%s" given',
                is_object($expiration) ? get_class($expiration) : gettype($expiration)
            ));
        }

        return $this;
    }