Set the DateTime when this playback availability window ends.

@param \Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface $targetExpirationDate
481767
public function setTargetExpirationDate(\Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface $targetExpirationDate)
    {
        $this->targetExpirationDate = $targetExpirationDate;
    }
979980
public function setDate(\DateTimeInterface $date)
    {
        $this->getDomElement()->nodeValue = $date->format(\DateTime::RFC3339);
        $this->setCachedProperty('content', $date);
    }
1309505
public void setDateExpires(long dateExpires) {

        m_dateExpires = dateExpires;
        if (LOG.isDebugEnabled()) {
            long now = System.currentTimeMillis();
            LOG.debug(
                Messages.get().getBundle().key(
                    Messages.LOG_FLEXCACHEENTRY_SET_EXPIRATION_DATE_3,
                    new Long(m_dateExpires),
                    new Long(now),
                    new Long(m_dateExpires - now)));
        }
    }
1064740
public function setDateActivation($dateActivation)
    {
        $dateActivation = ($dateActivation === null ? $dateActivation : (string) $dateActivation);

        if ($this->exists() && $this->dateActivation !== $dateActivation) {
            $this->updated['dateActivation'] = true;
        }

        $this->dateActivation = $dateActivation;

        return $this;
    }
1097944
private static function withExpires(
        ResponseInterface $response,
        CacheUtil $util,
        string $expires
    ): ResponseInterface {
        $expires = new DateTime($expires);
        $cacheControl = ResponseCacheControl::fromString($response->getHeaderLine('Cache-Control'))
            ->withMaxAge($expires->getTimestamp() - time());

        $response = $util->withExpires($response, $expires);

        return $util->withCacheControl($response, $cacheControl);
    }
743189
public function setExpiryDate($expirydate='')
    {
        if ( !$this->isExpiryDate($expirydate) ) {
            throw new TpvException('Expire date is not valid');
        }
        $this->_setParameters['DS_MERCHANT_EXPIRYDATE'] = $expirydate;
        return $this;

    }
375596
public function setPubDate(\Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface $pubDate)
    {
        $this->pubDate = $pubDate;
    }
1324631
public static function expiresAt($expiresAt)
    {
        if (false === $dateTime = DateTime::createFromFormat(DateTime::ATOM, $expiresAt)) {
            throw new InputValidationException('invalid "expires_at"');
        }

        return $dateTime;
    }
736838
public function setExpiryDate($date) {
    $iso8601 = NULL;

    if ($date != NULL)
      $iso8601 = date(DATE_ISO8601, strtotime($date));

    $this->_expired_at = $iso8601;
  }
1190644
public function expire($expire)
    {
        if (is_null($expire)) {
            $this->expire = null;
        } elseif (is_numeric($expire) || $expire instanceof DateInterval) {
            $this->expiresAfter($expire);
        } elseif ($expire instanceof DateTimeInterface) {
            $this->expire = $expire;
        } else {
            throw new InvalidArgumentException('not support datetime');
        }

        return $this;
    }
1074725
public final function expiresAt($expiration)
   {
       $this->timeToLive = $expiration instanceof DateTime
                         ? $expiration->getTimestamp() - time()
                         : (int) $expiration;
       return $this;
   }
854024
private function addExpiration(
        &$filters = [],
        \DateTime $dateSend = null
    ) {
        if ($filters) {
            $expiration = $dateSend ? $dateSend : new \DateTime();
            $expiration = $expiration->getTimestamp();
            foreach ($filters as &$filter) {
                $filter['exclusive_expire_date'] = $expiration;
            }
        }
    }
870140
public function setExpires($date): void
    {
        if ($date instanceof \DateTime) {
            $date = clone $date;
        } else {
            $date = new \DateTime($date);
        }

        $date->setTimezone(new \DateTimeZone('UTC'));
        $this->response->setHeader('Expires', $date->format('D, d M Y H:i:s') . ' GMT');
    }
151669
protected function verifyExpiration(array $tokenData)
    {
        if (!isset($tokenData['expirationDateTime'])) {
            return;
        }
        $expirationDateTime = \DateTime::createFromFormat(\DateTime::ISO8601, $tokenData['expirationDateTime']);
        if ($this->now instanceof DependencyProxy) {
            $this->now->_activateDependency();
        }
        if ($expirationDateTime < $this->now) {
            throw new AccessDeniedException(sprintf('Token expired!%sThis token expired at "%s"', chr(10),
                $expirationDateTime->format(\DateTime::ISO8601)), 1429697439);
        }
    }
87791
public function setAdded(\Lullabot\Mpx\DataService\DateTime\DateTimeFormatInterface $added)
    {
        $this->added = $added;
    }
949957
public function setSearchDateTimeRange(DateTimeInterface $dateTimeFrom, DateTimeInterface $dateTimeUntil): void
    {
        $this->dateTimeFrom = $dateTimeFrom;
        $this->dateTimeUntil = $dateTimeUntil;
        $this->query = $this->createSearchQuery();
    }
1170892
public function assignValuesToCode(TokenInterface $token, int $expirationInSeconds): void
    {
        try {
            $query = $this->getConnection()->createQueryBuilder();

            $now   = $this->ignoreException(function (): DateTimeImmutable {
                return new DateTimeImmutable();
            });
            $dbNow = $this->createTypedParameter($query, $now);

            $earliestExpired = $this->ignoreException(function () use ($now, $expirationInSeconds) : DateTimeImmutable {
                /** @var DateTimeImmutable $now */
                return $now->sub(new DateInterval("PT{$expirationInSeconds}S"));
            });

            $schema = $this->getDatabaseSchema();
            $query
                ->update($this->getTableNameForWriting())
                ->where($schema->getTokensCodeColumn() . '=' . $this->createTypedParameter($query, $token->getCode()))
                ->andWhere(
                    $schema->getTokensCodeCreatedAtColumn() . '>' .
                    $this->createTypedParameter($query, $earliestExpired)
                )
                ->set($schema->getTokensValueColumn(), $this->createTypedParameter($query, $token->getValue()))
                ->set($schema->getTokensTypeColumn(), $this->createTypedParameter($query, $token->getType()))
                ->set($schema->getTokensValueCreatedAtColumn(), $dbNow);

            if ($token->getRefreshValue() !== null) {
                $query
                    ->set(
                        $schema->getTokensRefreshColumn(),
                        $this->createTypedParameter($query, $token->getRefreshValue())
                    )->set($schema->getTokensRefreshCreatedAtColumn(), $dbNow);
            }

            $numberOfUpdated = $query->execute();
            assert(is_int($numberOfUpdated) === true);
        } /** @noinspection PhpRedundantCatchClauseInspection */ catch (DBALException $exception) {
            $message = 'Assigning token values by code failed.';
            throw new RepositoryException($message, 0, $exception);
        }
    }