getDate() public méthode

The returned date is configured to be in the GMT timezone.
public getDate ( ) : DateTime
Résultat DateTime The date of this response
 /**
  * @test
  */
 public function setDateAndGetDateSetAndGetTheDateHeader()
 {
     $now = \DateTime::createFromFormat(DATE_RFC2822, 'Tue, 22 May 2012 12:00:00 GMT');
     $response = new Response();
     $response->setDate($now);
     $this->assertEquals($now, $response->getDate());
     $response->setDate('Tue, 22 May 2012 12:00:00 GMT');
     $this->assertEquals($now, $response->getDate());
 }