public function setNow(\DateTime $now)
    {
        $this->now = clone $now;
        $this->now->setTimezone(new \DateTimeZone('UTC'));
        $this->headers->set('Date', $this->now);
    }
public function setNow(\DateTime $now)
    {
        $this->now = clone $now;
        $this->now->setTimezone(new \DateTimeZone('UTC'));
        $this->headers->set('Date', $this->now);
    }
public function setNow ( \ DateTime $ now ) { $ this -> now = clone $ now ; $ this -> now -> setTimezone ( new \ DateTimeZone ( 'UTC' ) ) ; $ this -> headers -> set ( 'Date' , $ this -> now ) ; }
Sets the current point in time.

This date / time is used internally for comparisons in order to determine the
freshness of this response. By default this DateTime object is set automatically
through dependency injection, configured in the Objects.yaml of the Flow package.

Unless you are mocking the current time in a test, there is probably no need
to use this function. Also note that this method must be called before any
of the Response methods are used and it must not be called a second time.

@param \DateTime $now The current point in time
@return void
@deprecated Since Flow 5.1, directly set the "Date" header
@see withHeader()
Sets the current point in time .