about summary refs log tree commit diff
path: root/absl/time/time_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/time/time_test.cc')
-rw-r--r--absl/time/time_test.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/absl/time/time_test.cc b/absl/time/time_test.cc
index e2b2f8097021..37af39d99830 100644
--- a/absl/time/time_test.cc
+++ b/absl/time/time_test.cc
@@ -112,7 +112,7 @@ TEST(Time, UnixEpoch) {
   const auto ci = absl::UTCTimeZone().At(absl::UnixEpoch());
   EXPECT_EQ(absl::CivilSecond(1970, 1, 1, 0, 0, 0), ci.cs);
   EXPECT_EQ(absl::ZeroDuration(), ci.subsecond);
-  EXPECT_EQ(absl::Weekday::thursday, absl::GetWeekday(absl::CivilDay(ci.cs)));
+  EXPECT_EQ(absl::Weekday::thursday, absl::GetWeekday(ci.cs));
 }
 
 TEST(Time, Breakdown) {
@@ -123,14 +123,14 @@ TEST(Time, Breakdown) {
   auto ci = tz.At(t);
   EXPECT_CIVIL_INFO(ci, 1969, 12, 31, 19, 0, 0, -18000, false);
   EXPECT_EQ(absl::ZeroDuration(), ci.subsecond);
-  EXPECT_EQ(absl::Weekday::wednesday, absl::GetWeekday(absl::CivilDay(ci.cs)));
+  EXPECT_EQ(absl::Weekday::wednesday, absl::GetWeekday(ci.cs));
 
   // Just before the epoch.
   t -= absl::Nanoseconds(1);
   ci = tz.At(t);
   EXPECT_CIVIL_INFO(ci, 1969, 12, 31, 18, 59, 59, -18000, false);
   EXPECT_EQ(absl::Nanoseconds(999999999), ci.subsecond);
-  EXPECT_EQ(absl::Weekday::wednesday, absl::GetWeekday(absl::CivilDay(ci.cs)));
+  EXPECT_EQ(absl::Weekday::wednesday, absl::GetWeekday(ci.cs));
 
   // Some time later.
   t += absl::Hours(24) * 2735;
@@ -139,7 +139,7 @@ TEST(Time, Breakdown) {
   ci = tz.At(t);
   EXPECT_CIVIL_INFO(ci, 1977, 6, 28, 14, 30, 15, -14400, true);
   EXPECT_EQ(8, ci.subsecond / absl::Nanoseconds(1));
-  EXPECT_EQ(absl::Weekday::tuesday, absl::GetWeekday(absl::CivilDay(ci.cs)));
+  EXPECT_EQ(absl::Weekday::tuesday, absl::GetWeekday(ci.cs));
 }
 
 TEST(Time, AdditiveOperators) {
@@ -979,15 +979,15 @@ TEST(Time, ConversionSaturation) {
   EXPECT_CIVIL_INFO(ci, std::numeric_limits<int64_t>::max(), 12, 31, 23,
                             59, 59, 0, false);
   EXPECT_EQ(absl::InfiniteDuration(), ci.subsecond);
-  EXPECT_EQ(absl::Weekday::thursday, absl::GetWeekday(absl::CivilDay(ci.cs)));
-  EXPECT_EQ(365, absl::GetYearDay(absl::CivilDay(ci.cs)));
+  EXPECT_EQ(absl::Weekday::thursday, absl::GetWeekday(ci.cs));
+  EXPECT_EQ(365, absl::GetYearDay(ci.cs));
   EXPECT_STREQ("-00", ci.zone_abbr);  // artifact of TimeZone::At()
   ci = utc.At(absl::InfinitePast());
   EXPECT_CIVIL_INFO(ci, std::numeric_limits<int64_t>::min(), 1, 1, 0, 0,
                             0, 0, false);
   EXPECT_EQ(-absl::InfiniteDuration(), ci.subsecond);
-  EXPECT_EQ(absl::Weekday::sunday, absl::GetWeekday(absl::CivilDay(ci.cs)));
-  EXPECT_EQ(1, absl::GetYearDay(absl::CivilDay(ci.cs)));
+  EXPECT_EQ(absl::Weekday::sunday, absl::GetWeekday(ci.cs));
+  EXPECT_EQ(1, absl::GetYearDay(ci.cs));
   EXPECT_STREQ("-00", ci.zone_abbr);  // artifact of TimeZone::At()
 
   // Approach the maximal Time value from below.