public function getDate() { if (!$this->headers->has('Date')) { $this->setDate(\DateTime::createFromFormat('U', time())); } return $this->headers->getDate('Date'); }
/** * {@inheritdoc} */ public function getDate() { $date = $this->headers->getDate('Date', null); if ($date === null) { $this->setDate(new \DateTime('now')); } return parent::getDate(); }