File indexing completed on 2025-01-18 09:27:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef ABSL_TIME_INTERNAL_CCTZ_TIME_ZONE_LIBC_H_
0016 #define ABSL_TIME_INTERNAL_CCTZ_TIME_ZONE_LIBC_H_
0017
0018 #include <memory>
0019 #include <string>
0020
0021 #include "absl/base/config.h"
0022 #include "time_zone_if.h"
0023
0024 namespace absl {
0025 ABSL_NAMESPACE_BEGIN
0026 namespace time_internal {
0027 namespace cctz {
0028
0029
0030
0031 class TimeZoneLibC : public TimeZoneIf {
0032 public:
0033
0034 static std::unique_ptr<TimeZoneLibC> Make(const std::string& name);
0035
0036
0037 time_zone::absolute_lookup BreakTime(
0038 const time_point<seconds>& tp) const override;
0039 time_zone::civil_lookup MakeTime(const civil_second& cs) const override;
0040 bool NextTransition(const time_point<seconds>& tp,
0041 time_zone::civil_transition* trans) const override;
0042 bool PrevTransition(const time_point<seconds>& tp,
0043 time_zone::civil_transition* trans) const override;
0044 std::string Version() const override;
0045 std::string Description() const override;
0046
0047 private:
0048 explicit TimeZoneLibC(const std::string& name);
0049 TimeZoneLibC(const TimeZoneLibC&) = delete;
0050 TimeZoneLibC& operator=(const TimeZoneLibC&) = delete;
0051
0052 const bool local_;
0053 };
0054
0055 }
0056 }
0057 ABSL_NAMESPACE_END
0058 }
0059
0060 #endif