1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:07:34 +00:00

LibTimeZone+Userland: Change timezone functions to use UnixDateTime

This incurs a whole host of changes in, among others, JavaScript Intl
and Date.
This commit is contained in:
kleines Filmröllchen 2023-03-13 22:28:08 +01:00 committed by Jelle Raaijmakers
parent 939600d2d4
commit 82c681e44b
13 changed files with 43 additions and 43 deletions

View file

@ -162,9 +162,9 @@ enum class OptionDefaults {
// Table 8: Record returned by ToLocalTime, https://tc39.es/ecma402/#table-datetimeformat-tolocaltime-record
// Note: [[InDST]] is not included here - it is handled by LibUnicode / LibTimeZone.
struct LocalTime {
AK::Duration time_since_epoch() const
AK::UnixDateTime time_since_epoch() const
{
return AK::Duration::from_timestamp(year, month + 1, day + 1, hour, minute, second, millisecond);
return AK::UnixDateTime::from_unix_time_parts(year, month + 1, day + 1, hour, minute, second, millisecond);
}
int weekday { 0 }; // [[Weekday]]