Lines Matching refs:Time
95 class Time; // Defined below variable
100 constexpr Time FromUnixDuration(Duration d);
101 constexpr Duration ToUnixDuration(Time t);
602 class Time {
615 constexpr Time() = default;
618 constexpr Time(const Time& t) = default;
619 Time& operator=(const Time& t) = default;
622 Time& operator+=(Duration d) {
626 Time& operator-=(Duration d) {
670 friend H AbslHashValue(H h, Time t) { in AbslHashValue()
675 friend constexpr Time time_internal::FromUnixDuration(Duration d);
676 friend constexpr Duration time_internal::ToUnixDuration(Time t);
677 friend constexpr bool operator<(Time lhs, Time rhs);
678 friend constexpr bool operator==(Time lhs, Time rhs);
679 friend Duration operator-(Time lhs, Time rhs);
680 friend constexpr Time UniversalEpoch();
681 friend constexpr Time InfiniteFuture();
682 friend constexpr Time InfinitePast();
683 constexpr explicit Time(Duration rep) : rep_(rep) {} in Time() function
688 constexpr bool operator<(Time lhs, Time rhs) { return lhs.rep_ < rhs.rep_; }
689 constexpr bool operator>(Time lhs, Time rhs) { return rhs < lhs; }
690 constexpr bool operator>=(Time lhs, Time rhs) { return !(lhs < rhs); }
691 constexpr bool operator<=(Time lhs, Time rhs) { return !(rhs < lhs); }
692 constexpr bool operator==(Time lhs, Time rhs) { return lhs.rep_ == rhs.rep_; }
693 constexpr bool operator!=(Time lhs, Time rhs) { return !(lhs == rhs); }
696 inline Time operator+(Time lhs, Duration rhs) { return lhs += rhs; }
697 inline Time operator+(Duration lhs, Time rhs) { return rhs += lhs; }
698 inline Time operator-(Time lhs, Duration rhs) { return lhs -= rhs; }
699 inline Duration operator-(Time lhs, Time rhs) { return lhs.rep_ - rhs.rep_; }
704 constexpr Time UnixEpoch() { return Time(); } in UnixEpoch()
710 constexpr Time UniversalEpoch() { in UniversalEpoch()
713 return Time(time_internal::MakeDuration(-24 * 719162 * int64_t{3600}, 0U)); in UniversalEpoch()
719 constexpr Time InfiniteFuture() { in InfiniteFuture()
720 return Time( in InfiniteFuture()
727 constexpr Time InfinitePast() { in InfinitePast()
728 return Time( in InfinitePast()
741 constexpr Time FromUnixNanos(int64_t ns);
742 constexpr Time FromUnixMicros(int64_t us);
743 constexpr Time FromUnixMillis(int64_t ms);
744 constexpr Time FromUnixSeconds(int64_t s);
745 constexpr Time FromTimeT(time_t t);
746 Time FromUDate(double udate);
747 Time FromUniversal(int64_t universal);
761 int64_t ToUnixNanos(Time t);
762 int64_t ToUnixMicros(Time t);
763 int64_t ToUnixMillis(Time t);
764 int64_t ToUnixSeconds(Time t);
765 time_t ToTimeT(Time t);
766 double ToUDate(Time t);
767 int64_t ToUniversal(Time t);
787 Time TimeFromTimespec(timespec ts);
788 Time TimeFromTimeval(timeval tv);
789 timespec ToTimespec(Time t);
790 timeval ToTimeval(Time t);
801 Time FromChrono(const std::chrono::system_clock::time_point& tp);
814 std::chrono::system_clock::time_point ToChronoTime(Time);
826 bool AbslParseFlag(absl::string_view text, Time* t, std::string* error);
827 std::string AbslUnparseFlag(Time t);
829 bool ParseFlag(const std::string& text, Time* t, std::string* error);
831 std::string UnparseFlag(Time t);
908 CivilInfo At(Time t) const;
930 Time pre; // time calculated using the pre-transition offset
931 Time trans; // when the civil-time discontinuity occurred
932 Time post; // time calculated using the post-transition offset
1001 bool NextTransition(Time t, CivilTransition* trans) const;
1002 bool PrevTransition(Time t, CivilTransition* trans) const;
1076 inline CivilSecond ToCivilSecond(Time t, TimeZone tz) { in ToCivilSecond()
1079 inline CivilMinute ToCivilMinute(Time t, TimeZone tz) { in ToCivilMinute()
1082 inline CivilHour ToCivilHour(Time t, TimeZone tz) { in ToCivilHour()
1085 inline CivilDay ToCivilDay(Time t, TimeZone tz) { in ToCivilDay()
1088 inline CivilMonth ToCivilMonth(Time t, TimeZone tz) { in ToCivilMonth()
1091 inline CivilYear ToCivilYear(Time t, TimeZone tz) { in ToCivilYear()
1107 inline Time FromCivil(CivilSecond ct, TimeZone tz) { in FromCivil()
1123 Time pre; // time calculated using the pre-transition offset
1124 Time trans; // when the civil-time discontinuity occurred
1125 Time post; // time calculated using the post-transition offset
1174 inline Time FromDateTime(int64_t year, int mon, int day, int hour, in FromDateTime()
1188 Time FromTM(const struct tm& tm, TimeZone tz);
1194 struct tm ToTM(Time t, TimeZone tz);
1253 std::string FormatTime(absl::string_view format, Time t, TimeZone tz);
1258 std::string FormatTime(Time t, TimeZone tz);
1259 std::string FormatTime(Time t);
1262 inline std::ostream& operator<<(std::ostream& os, Time t) {
1315 bool ParseTime(absl::string_view format, absl::string_view input, Time* time,
1326 Time* time, std::string* err);
1392 constexpr Time FromUnixDuration(Duration d) { return Time(d); } in FromUnixDuration()
1393 constexpr Duration ToUnixDuration(Time t) { return t.rep_; } in ToUnixDuration()
1560 constexpr Time FromUnixNanos(int64_t ns) { in FromUnixNanos()
1564 constexpr Time FromUnixMicros(int64_t us) { in FromUnixMicros()
1568 constexpr Time FromUnixMillis(int64_t ms) { in FromUnixMillis()
1572 constexpr Time FromUnixSeconds(int64_t s) { in FromUnixSeconds()
1576 constexpr Time FromTimeT(time_t t) { in FromTimeT()