20 #ifndef ABSL_TIME_INTERNAL_CCTZ_TIME_ZONE_H_ 21 #define ABSL_TIME_INTERNAL_CCTZ_TIME_ZONE_H_ 31 namespace time_internal {
36 using time_point = std::chrono::time_point<std::chrono::system_clock, D>;
37 using seconds = std::chrono::duration<std::int_fast64_t>;
42 inline std::pair<time_point<seconds>, D>
44 auto sec = std::chrono::time_point_cast<
seconds>(tp);
46 if (sub.count() < 0) {
50 return {
sec, std::chrono::duration_cast<D>(sub)};
52 inline std::pair<time_point<seconds>,
seconds>
54 return {tp, seconds::zero()};
82 std::string
name()
const;
104 template <
typename D>
196 template <
typename D>
203 template <
typename D>
217 std::string description()
const;
224 return !(lhs == rhs);
227 template <
typename H>
236 const Impl& effective_impl()
const;
261 template <
typename D>
279 using femtoseconds = std::chrono::duration<std::int_fast64_t, std::femto>;
282 bool parse(
const std::string&,
const std::string&,
const time_zone&,
314 template <
typename D>
367 template <
typename D>
368 inline bool parse(
const std::string& fmt,
const std::string& input,
375 *tpp = std::chrono::time_point_cast<D>(
sec);
376 *tpp += std::chrono::duration_cast<D>(fs);
385 #endif // ABSL_TIME_INTERNAL_CCTZ_TIME_ZONE_H_ bool prev_transition(const time_point< D > &tp, civil_transition *trans) const
time_point< seconds > post
time_point< seconds > trans
friend bool operator!=(time_zone lhs, time_zone rhs)
std::pair< time_point< seconds >, D > split_seconds(const time_point< D > &tp)
time_zone fixed_time_zone(const seconds &offset)
friend bool operator==(time_zone lhs, time_zone rhs)
std::chrono::duration< std::int_fast64_t, std::femto > femtoseconds
std::chrono::duration< std::int_fast64_t > seconds
friend H AbslHashValue(H h, time_zone tz)
time_zone local_time_zone()
std::string format(const std::string &, const time_point< seconds > &, const femtoseconds &, const time_zone &)
time_zone(const Impl *impl)
absolute_lookup lookup(const time_point< seconds > &tp) const
bool parse(const std::string &, const std::string &, const time_zone &, time_point< seconds > *, femtoseconds *, std::string *err=nullptr)
absolute_lookup lookup(const time_point< D > &tp) const
bool next_transition(const time_point< D > &tp, civil_transition *trans) const
time_point< seconds > pre
enum absl::time_internal::cctz::time_zone::civil_lookup::civil_kind kind
std::chrono::time_point< std::chrono::system_clock, D > time_point
time_zone utc_time_zone()
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
bool load_time_zone(const std::string &name, time_zone *tz)
const Impl & effective_impl() const
civil_second convert(const time_point< D > &tp, const time_zone &tz)