diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2023-03-13 22:28:08 +0100 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-05-24 23:18:07 +0200 |
commit | 82c681e44b57563074e5c12dc7e36134b36ae750 (patch) | |
tree | 8617fd279fe87bf44fcb65ffc4add8dca394db97 /Userland/Utilities | |
parent | 939600d2d4d2d04524301f4373d76dc3c693923a (diff) | |
download | serenity-82c681e44b57563074e5c12dc7e36134b36ae750.zip |
LibTimeZone+Userland: Change timezone functions to use UnixDateTime
This incurs a whole host of changes in, among others, JavaScript Intl
and Date.
Diffstat (limited to 'Userland/Utilities')
-rw-r--r-- | Userland/Utilities/touch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Utilities/touch.cpp b/Userland/Utilities/touch.cpp index 1492929f02..f89bc67506 100644 --- a/Userland/Utilities/touch.cpp +++ b/Userland/Utilities/touch.cpp @@ -88,7 +88,7 @@ static void parse_time(StringView input_time, timespec& atime, timespec& mtime) month = parameters.take_last(); if (validate_timestamp(year, month, day, hour, minute, second)) - atime = mtime = AK::Duration::from_timestamp(year, month, day, hour, minute, second, 0).to_timespec(); + atime = mtime = AK::UnixDateTime::from_unix_time_parts(year, month, day, hour, minute, second, 0).to_timespec(); else err("invalid time format '{}'", input_time); } @@ -159,7 +159,7 @@ static void parse_datetime(StringView input_datetime, timespec& atime, timespec& } if (validate_timestamp(year, month, day, hour, minute, second)) { - auto timestamp = AK::Duration::from_timestamp(year, month, day, hour, minute, second, millisecond); + auto timestamp = AK::UnixDateTime::from_unix_time_parts(year, month, day, hour, minute, second, millisecond); auto time = timestamp.to_timespec(); if (time_zone.is_empty() && TimeZone::system_time_zone() != "UTC") { auto offset = TimeZone::get_time_zone_offset(TimeZone::system_time_zone(), timestamp); |