Lines Matching refs:Time
95 class Time; // Defined below variable
100 constexpr Time FromUnixDuration(Duration d);
101 constexpr Duration ToUnixDuration(Time t);
612 class Time {
625 constexpr Time() = default;
628 constexpr Time(const Time& t) = default;
629 Time& operator=(const Time& t) = default;
632 Time& operator+=(Duration d) {
636 Time& operator-=(Duration d) {
680 friend H AbslHashValue(H h, Time t) { in AbslHashValue()
685 friend constexpr Time time_internal::FromUnixDuration(Duration d);
686 friend constexpr Duration time_internal::ToUnixDuration(Time t);
687 friend constexpr bool operator<(Time lhs, Time rhs);
688 friend constexpr bool operator==(Time lhs, Time rhs);
689 friend Duration operator-(Time lhs, Time rhs);
690 friend constexpr Time UniversalEpoch();
691 friend constexpr Time InfiniteFuture();
692 friend constexpr Time InfinitePast();
693 constexpr explicit Time(Duration rep) : rep_(rep) {} in Time() function
698 constexpr bool operator<(Time lhs, Time rhs) { return lhs.rep_ < rhs.rep_; }
699 constexpr bool operator>(Time lhs, Time rhs) { return rhs < lhs; }
700 constexpr bool operator>=(Time lhs, Time rhs) { return !(lhs < rhs); }
701 constexpr bool operator<=(Time lhs, Time rhs) { return !(rhs < lhs); }
702 constexpr bool operator==(Time lhs, Time rhs) { return lhs.rep_ == rhs.rep_; }
703 constexpr bool operator!=(Time lhs, Time rhs) { return !(lhs == rhs); }
706 inline Time operator+(Time lhs, Duration rhs) { return lhs += rhs; }
707 inline Time operator+(Duration lhs, Time rhs) { return rhs += lhs; }
708 inline Time operator-(Time lhs, Duration rhs) { return lhs -= rhs; }
709 inline Duration operator-(Time lhs, Time rhs) { return lhs.rep_ - rhs.rep_; }
714 constexpr Time UnixEpoch() { return Time(); } in UnixEpoch()
720 constexpr Time UniversalEpoch() { in UniversalEpoch()
723 return Time(time_internal::MakeDuration(-24 * 719162 * int64_t{3600}, 0U)); in UniversalEpoch()
729 constexpr Time InfiniteFuture() { in InfiniteFuture()
730 return Time( in InfiniteFuture()
737 constexpr Time InfinitePast() { in InfinitePast()
738 return Time( in InfinitePast()
751 constexpr Time FromUnixNanos(int64_t ns);
752 constexpr Time FromUnixMicros(int64_t us);
753 constexpr Time FromUnixMillis(int64_t ms);
754 constexpr Time FromUnixSeconds(int64_t s);
755 constexpr Time FromTimeT(time_t t);
756 Time FromUDate(double udate);
757 Time FromUniversal(int64_t universal);
771 int64_t ToUnixNanos(Time t);
772 int64_t ToUnixMicros(Time t);
773 int64_t ToUnixMillis(Time t);
774 int64_t ToUnixSeconds(Time t);
775 time_t ToTimeT(Time t);
776 double ToUDate(Time t);
777 int64_t ToUniversal(Time t);
797 Time TimeFromTimespec(timespec ts);
798 Time TimeFromTimeval(timeval tv);
799 timespec ToTimespec(Time t);
800 timeval ToTimeval(Time t);
811 Time FromChrono(const std::chrono::system_clock::time_point& tp);
824 std::chrono::system_clock::time_point ToChronoTime(Time);
840 bool AbslParseFlag(absl::string_view text, Time* t, std::string* error);
846 std::string AbslUnparseFlag(Time t);
849 bool ParseFlag(const std::string& text, Time* t, std::string* error);
851 std::string UnparseFlag(Time t);
928 CivilInfo At(Time t) const;
950 Time pre; // time calculated using the pre-transition offset
951 Time trans; // when the civil-time discontinuity occurred
952 Time post; // time calculated using the post-transition offset
1021 bool NextTransition(Time t, CivilTransition* trans) const;
1022 bool PrevTransition(Time t, CivilTransition* trans) const;
1096 inline CivilSecond ToCivilSecond(Time t, TimeZone tz) { in ToCivilSecond()
1099 inline CivilMinute ToCivilMinute(Time t, TimeZone tz) { in ToCivilMinute()
1102 inline CivilHour ToCivilHour(Time t, TimeZone tz) { in ToCivilHour()
1105 inline CivilDay ToCivilDay(Time t, TimeZone tz) { in ToCivilDay()
1108 inline CivilMonth ToCivilMonth(Time t, TimeZone tz) { in ToCivilMonth()
1111 inline CivilYear ToCivilYear(Time t, TimeZone tz) { in ToCivilYear()
1127 inline Time FromCivil(CivilSecond ct, TimeZone tz) { in FromCivil()
1143 Time pre; // time calculated using the pre-transition offset
1144 Time trans; // when the civil-time discontinuity occurred
1145 Time post; // time calculated using the post-transition offset
1194 inline Time FromDateTime(int64_t year, int mon, int day, int hour, in FromDateTime()
1212 Time FromTM(const struct tm& tm, TimeZone tz);
1218 struct tm ToTM(Time t, TimeZone tz);
1277 std::string FormatTime(absl::string_view format, Time t, TimeZone tz);
1282 std::string FormatTime(Time t, TimeZone tz);
1283 std::string FormatTime(Time t);
1286 inline std::ostream& operator<<(std::ostream& os, Time t) {
1339 bool ParseTime(absl::string_view format, absl::string_view input, Time* time,
1350 Time* time, std::string* err);
1416 constexpr Time FromUnixDuration(Duration d) { return Time(d); } in FromUnixDuration()
1417 constexpr Duration ToUnixDuration(Time t) { return t.rep_; } in ToUnixDuration()
1582 constexpr Time FromUnixNanos(int64_t ns) { in FromUnixNanos()
1586 constexpr Time FromUnixMicros(int64_t us) { in FromUnixMicros()
1590 constexpr Time FromUnixMillis(int64_t ms) { in FromUnixMillis()
1594 constexpr Time FromUnixSeconds(int64_t s) { in FromUnixSeconds()
1598 constexpr Time FromTimeT(time_t t) { in FromTimeT()