Skip to content

Commit

Permalink
[HttpFoundation] fix perf of ResponseHeaderBag::initDate()
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed May 6, 2020
1 parent cfd66f5 commit 939b7b9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ResponseHeaderBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,6 @@ protected function computeCacheControlValue()

private function initDate(): void
{
$now = \DateTime::createFromFormat('U', time());
$now->setTimezone(new \DateTimeZone('UTC'));
$this->set('Date', $now->format('D, d M Y H:i:s').' GMT');
$this->set('Date', gmdate('D, d M Y H:i:s').' GMT');
}
}

0 comments on commit 939b7b9

Please sign in to comment.