mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
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:
committed by
Jelle Raaijmakers
parent
efa9737cf7
commit
3171d57639
Notes:
github-actions[bot]
2025-06-25 21:42:10 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/3171d576395 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5216 Reviewed-by: https://github.com/gmta ✅
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user