Sets modification time
@param \DateTime $time
963826
public function setModificationTime(\DateTime $time = null)
	{
		if (is_null($time)) {
			$time = new \DateTime('now');
		}
		$this->modificationTime = $time;
	}
218728
public function withLastModified(DateTime $date)
    {
        $this->withoutHeader('Last-Modified');
        $this->withHeader('Last-Modified', $date->format('D, d M Y H:i:s') . ' GMT');

        return $this;
    }
734490
public function buildDateTimeRawValue(\DateTime $dateTime = null) {
		if (null === $dateTime) {
			return null;
		}
		
		return DateUtils::formatDateTime($dateTime, MysqlDateTimeColumn::FORMAT_DATE_TIME);
	}
764533
public static function diff(DateTime $time,DateTime $time0=null)
    {
        if($time0==null){
            $time0=new DateTime();
        }
        return $time->diffFrom($time0);
    }
484435
public static function newImmutablePhpDateTime($time = 'now', \DateTimeZone $timeZone = null)
    {
        if (self::DATETIME_SYSTEM === self::$type) {
            return new \DateTimeImmutable($time, $timeZone);
        }

        if (self::DATETIME_FIXED === self::$type) {
            return self::getFixedImmutableTimeFromConfiguredTimestamp($time, $timeZone);
        }

        $date = self::getFixedImmutableTimeFromConfiguredTimestamp($time, $timeZone);
        $timePassedSinceInstantiation = abs(
            (new \DateTime())->getTimestamp() - self::$offsetTimestamp
        );

        return $date->modify("+{$timePassedSinceInstantiation} seconds");
    }
1223007
public function setReferenceTime(\DateTimeInterface $dateTime)
    {
        $dt = $dateTime->format(DATE_ISO8601);
        $this->add('reference_time', $dt);
    }
266114
public function setTimeFromTimeString($time)
    {
        $time = explode(':', $time);

        $hour = (int) $time[0];
        $minute = isset($time[1]) ? (int) $time[1] : 0;
        $second = isset($time[2]) ? (int) $time[2] : 0;

        return $this->setTime($hour, $minute, $second);
    }
792529
public function modify(string $modify): DateTime
    {
        $dateTime = $this->dateTime()->modify($modify);

        return static::fromNative($dateTime);
    }
327127
public function setUpdatedAt($time)
    {
        if ($time instanceof \DateTimeInterface) {
            $time = $time->format(DATE_RFC3339);
        }

        $this->setValue('lastModified', (string) $time);
    }
908749
private function setValue(?\DateTimeImmutable $value = null): void
    {
        if ($value === null) {
            $this->value = null;

            return;
        }

        $this->value = $value->setTime((int) $value->format('H'), (int) $value->format('i'), 0);
    }
967926
protected function setTime($token, $time = 0)
    {
        if ($time == 0) {
            $time = time();
        }

        $this->timer[$token] = $time;
    }
558047
public function setHiddenAfterDateTime(\DateTimeInterface $dateTime = null)
    {
        if ($this->hiddenAfterDateTime != $dateTime) {
            $this->hiddenAfterDateTime = $dateTime;
            $this->addOrUpdate();
        }
    }
240157
protected function convertToDateTime( $time )
    {
        if ( $time instanceof DateTime )
        {
            return clone $time;
        }
        else if ( $time instanceof \DateTime )
        {
            return new DateTime( $time->format( \DateTime::ISO8601 ) );
        }
        else if ( is_numeric( $time ) )
        {
            return new DateTime( '@' . $time );
        }

        return new DateTime( (string) $time );
    }
628496
public function setModified(\DateTime $modified = null)
    {
        $this->_modified = null === $modified ? new \DateTime() : $modified;

        return $this->getContentInstance();
    }
460817
public function setHiddenAfterDateTime(\DateTimeInterface $dateTime = null): void
    {
        if ($this->getHiddenAfterDateTime() instanceof \DateTimeInterface && $dateTime instanceof \DateTimeInterface && $this->getHiddenAfterDateTime()->format(\DateTime::W3C) === $dateTime->format(\DateTime::W3C)) {
            return;
        }
        $this->materializeNodeDataAsNeeded();
        $this->nodeData->setHiddenAfterDateTime($dateTime);

        $this->context->getFirstLevelNodeCache()->flush();
        $this->emitNodeUpdated($this);
    }
125853
public function setRevisionDate(?int $time = null): void
    {
        $this->setHeader('PO-Revision-Date', $this->formatTimestamp($time));
    }
1329001
public function setCreationTime(\DateTime $time = null)
	{
		if (is_null($time)) {
			$time = new \DateTime('now');
		}
		$this->creationTime = $time;
	}