LibWeb: Restore flags to prevent formatting timestamps as local time

The flag to stringify these timestamps as UTC was errantly dropped in
6fb2be96bf. This was causing test-web to
fail in time zones other than GMT+0.
This commit is contained in:
Timothy Flynn 2025-06-25 16:32:24 -04:00 committed by Jelle Raaijmakers
commit 3171d57639
Notes: github-actions[bot] 2025-06-25 21:42:10 +00:00
7 changed files with 63 additions and 18 deletions

View file

@ -146,7 +146,7 @@ static HTTP::HeaderMap response_headers_for_file(StringView path, Optional<time_
if (modified_time.has_value()) {
auto const datetime = AK::UnixDateTime::from_seconds_since_epoch(modified_time.value());
response_headers.set("Last-Modified"sv, datetime.to_byte_string("%a, %d %b %Y %H:%M:%S GMT"sv));
response_headers.set("Last-Modified"sv, datetime.to_byte_string("%a, %d %b %Y %H:%M:%S GMT"sv, AK::UnixDateTime::LocalTime::No));
}
return response_headers;