Skip to content

Commit 939b7b9

Browse files
[HttpFoundation] fix perf of ResponseHeaderBag::initDate()
1 parent cfd66f5 commit 939b7b9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ResponseHeaderBag.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,6 @@ protected function computeCacheControlValue()
286286

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

0 commit comments

Comments
 (0)