summaryrefslogtreecommitdiff
path: root/absl/time/time.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/time/time.cc')
-rw-r--r--absl/time/time.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/absl/time/time.cc b/absl/time/time.cc
index a11e8e9b..d983c12b 100644
--- a/absl/time/time.cc
+++ b/absl/time/time.cc
@@ -66,6 +66,7 @@ inline int64_t FloorToUnit(absl::Duration d, absl::Duration unit) {
: q - 1;
}
+ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING
inline absl::Time::Breakdown InfiniteFutureBreakdown() {
absl::Time::Breakdown bd;
bd.year = std::numeric_limits<int64_t>::max();
@@ -99,6 +100,7 @@ inline absl::Time::Breakdown InfinitePastBreakdown() {
bd.zone_abbr = "-00";
return bd;
}
+ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING
inline absl::TimeZone::CivilInfo InfiniteFutureCivilInfo() {
TimeZone::CivilInfo ci;
@@ -120,6 +122,7 @@ inline absl::TimeZone::CivilInfo InfinitePastCivilInfo() {
return ci;
}
+ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING
inline absl::TimeConversion InfiniteFutureTimeConversion() {
absl::TimeConversion tc;
tc.pre = tc.trans = tc.post = absl::InfiniteFuture();
@@ -135,6 +138,7 @@ inline TimeConversion InfinitePastTimeConversion() {
tc.normalized = true;
return tc;
}
+ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING
// Makes a Time from sec, overflowing to InfiniteFuture/InfinitePast as
// necessary. If sec is min/max, then consult cs+tz to check for overflow.
@@ -203,6 +207,7 @@ bool FindTransition(const cctz::time_zone& tz,
// Time
//
+ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING
absl::Time::Breakdown Time::In(absl::TimeZone tz) const {
if (*this == absl::InfiniteFuture()) return InfiniteFutureBreakdown();
if (*this == absl::InfinitePast()) return InfinitePastBreakdown();
@@ -227,6 +232,7 @@ absl::Time::Breakdown Time::In(absl::TimeZone tz) const {
bd.zone_abbr = al.abbr;
return bd;
}
+ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING
//
// Conversions from/to other time types.
@@ -398,7 +404,7 @@ bool TimeZone::PrevTransition(Time t, CivilTransition* trans) const {
//
// Conversions involving time zones.
//
-
+ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING
absl::TimeConversion ConvertDateTime(int64_t year, int mon, int day, int hour,
int min, int sec, TimeZone tz) {
// Avoids years that are too extreme for CivilSecond to normalize.
@@ -430,6 +436,7 @@ absl::TimeConversion ConvertDateTime(int64_t year, int mon, int day, int hour,
}
return tc;
}
+ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING
absl::Time FromTM(const struct tm& tm, absl::TimeZone tz) {
civil_year_t tm_year = tm.tm_year;