mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb/HTML: Correctly parse milliseconds in time inputs
This commit brings the way we parse time inputs closer to the spec by no longer ignoring milliseconds in time strings.
This commit is contained in:
committed by
Tim Flynn
parent
d37d0e4b59
commit
9c758e5f65
Notes:
github-actions[bot]
2025-04-19 11:10:32 +00:00
Author: https://github.com/skyz1 Commit: https://github.com/LadybirdBrowser/ladybird/commit/9c758e5f653 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4397 Reviewed-by: https://github.com/trflynn89
@@ -2209,7 +2209,7 @@ static Optional<double> convert_local_date_and_time_string_to_number(StringView
|
||||
auto date = date_and_time.date;
|
||||
auto time = date_and_time.time;
|
||||
|
||||
auto date_time = UnixDateTime::from_unix_time_parts(date.year, date.month, date.day, time.hour, time.minute, time.second, 0);
|
||||
auto date_time = UnixDateTime::from_unix_time_parts(date.year, date.month, date.day, time.hour, time.minute, time.second, static_cast<i32>(time.second * 1000) % 1000);
|
||||
return date_time.milliseconds_since_epoch();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user