class time_zone
Defined at line 69 of file ../../third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h
cctz::time_zone is an opaque, small, value-type class representing a
geo-political region within which particular rules are used for mapping
between absolute and civil times. Time zones are named using the TZ
identifiers from the IANA Time Zone Database, such as "America/Los_Angeles"
or "Australia/Sydney". Time zones are created from factory functions such
as load_time_zone(). Note: strings like "PST" and "EDT" are not valid TZ
identifiers.
Example:
cctz::time_zone utc = cctz::utc_time_zone();
cctz::time_zone pst = cctz::fixed_time_zone(std::chrono::hours(-8));
cctz::time_zone loc = cctz::local_time_zone();
cctz::time_zone lax;
if (!cctz::load_time_zone("America/Los_Angeles",
&lax
)) { ... }
See also:
- http://www.iana.org/time-zones
- https://en.wikipedia.org/wiki/Zoneinfo
Public Methods
std::string name ()
absolute_lookup lookup (const time_point<seconds> & tp)
void time_zone ()
Defined at line 71 of file ../../third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h
void time_zone (const time_zone & )
Defined at line 72 of file ../../third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h
time_zone & operator= (const time_zone & )
Defined at line 73 of file ../../third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h
template <typename D>
absolute_lookup lookup (const time_point<D> & tp)
Defined at line 98 of file ../../third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h
civil_lookup lookup (const civil_second & cs)
bool next_transition (const time_point<seconds> & tp, civil_transition * trans)
template <typename D>
bool next_transition (const time_point<D> & tp, civil_transition * trans)
Defined at line 190 of file ../../third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h
bool prev_transition (const time_point<seconds> & tp, civil_transition * trans)
template <typename D>
bool prev_transition (const time_point<D> & tp, civil_transition * trans)
Defined at line 196 of file ../../third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h
std::string version ()
version() and description() provide additional information about the
time zone. The content of each of the returned strings is unspecified,
however, when the IANA Time Zone Database is the underlying data source
the version() string will be in the familar form (e.g, "2018e") or
empty when unavailable.
Note: These functions are for informational or testing purposes only.
std::string description ()
Records
Friends
template <typename H>
H time_zone (H h, time_zone tz)
bool time_zone (time_zone lhs, time_zone rhs)
bool time_zone (time_zone lhstime_zone rhs)