1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 08:18:12 +00:00

AK: Rename Time to Duration

That's what this class really is; in fact that's what the first line of
the comment says it is.

This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
This commit is contained in:
kleines Filmröllchen 2023-03-13 16:30:34 +01:00 committed by Jelle Raaijmakers
parent 82ddc813d5
commit 213025f210
140 changed files with 634 additions and 628 deletions

View file

@ -14,7 +14,7 @@ using enum TimeZone::InDST;
static void test_offset(StringView time_zone, i64 time, i64 expected_offset, TimeZone::InDST expected_in_dst)
{
auto actual_offset = TimeZone::get_time_zone_offset(time_zone, AK::Time::from_seconds(time));
auto actual_offset = TimeZone::get_time_zone_offset(time_zone, AK::Duration::from_seconds(time));
VERIFY(actual_offset.has_value());
EXPECT_EQ(actual_offset->seconds, expected_offset);
EXPECT_EQ(actual_offset->in_dst, expected_in_dst);
@ -183,7 +183,7 @@ TEST_CASE(get_time_zone_offset_with_dst)
TEST_CASE(get_named_time_zone_offsets)
{
auto test_named_offsets = [](auto time_zone, i64 time, i64 expected_standard_offset, i64 expected_daylight_offset, auto expected_standard_name, auto expected_daylight_name) {
auto actual_offsets = TimeZone::get_named_time_zone_offsets(time_zone, AK::Time::from_seconds(time));
auto actual_offsets = TimeZone::get_named_time_zone_offsets(time_zone, AK::Duration::from_seconds(time));
VERIFY(actual_offsets.has_value());
EXPECT_EQ(actual_offsets->at(0).seconds, expected_standard_offset);