mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-04 16:11:54 +00: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:
parent
d37d0e4b59
commit
9c758e5f65
Notes:
github-actions[bot]
2025-04-19 11:10:32 +00:00
Author: https://github.com/skyz1
Commit: 9c758e5f65
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4397
Reviewed-by: https://github.com/trflynn89
9 changed files with 118 additions and 49 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue