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
parent efa9737cf7
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

@ -2326,7 +2326,7 @@ static String convert_number_to_date_string(double input)
// date string that represents the date that, in UTC, is current input milliseconds after midnight UTC
// on the morning of 1970-01-01 (the time represented by the value "1970-01-01T00:00:00.0Z").
auto date = AK::UnixDateTime::from_seconds_since_epoch(input / 1000.);
return MUST(date.to_string("%Y-%m-%d"sv));
return MUST(date.to_string("%Y-%m-%d"sv, AK::UnixDateTime::LocalTime::No));
}
// https://html.spec.whatwg.org/multipage/input.html#time-state-(type=time):concept-input-value-number-string