Skip to content

Commit

Permalink
Fix time format in headers.
Browse files Browse the repository at this point in the history
The hour should be in 2 digit format while "G" doesn't add leading zero in case of single digit.
  • Loading branch information
ADmad committed Mar 1, 2021
1 parent 0510942 commit dd9fa55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Middleware/GlideMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ protected function _withCacheHeaders($response, $cacheTime, $modifiedTime)

return $response
->withHeader('Cache-Control', 'public,max-age=' . $maxAge)
->withHeader('Date', gmdate('D, j M Y G:i:s \G\M\T', time()))
->withHeader('Last-Modified', gmdate('D, j M Y G:i:s \G\M\T', (int)$modifiedTime))
->withHeader('Expires', gmdate('D, j M Y G:i:s \G\M\T', $expire));
->withHeader('Date', gmdate('D, j M Y H:i:s \G\M\T', time()))
->withHeader('Last-Modified', gmdate('D, j M Y H:i:s \G\M\T', (int)$modifiedTime))
->withHeader('Expires', gmdate('D, j M Y H:i:s \G\M\T', $expire));
}

/**
Expand Down

0 comments on commit dd9fa55

Please sign in to comment.