Zone sources from std::chrono::tzdb; see hegel/extras/chrono_tzdb.h.
More...
Zone sources from std::chrono::tzdb; see hegel/extras/chrono_tzdb.h.
◆ oracle()
| generators::temporal::ZoneOracle hegel::extras::chrono_tzdb::oracle |
( |
const std::chrono::time_zone & | zone, |
|
|
int32_t | first_year = 1800, |
|
|
int32_t | last_year = 2100 ) |
|
inline |
An offset oracle over a standard library time zone.
- Parameters
-
| zone | The zone, which must outlive the call it is probed in. |
| first_year | The first year probed. |
| last_year | The last year probed; after it the yearly rule of the last two years holds. |
- Returns
- The oracle, for ZoneSource::add_oracle().
◆ zone_source()
A zone source over the standard library's time zone database, std::chrono::get_tzdb().
Every zone and link name of the database is declared, its links added, and its release recorded as the version; each zone is probed through oracle() the first time a draw or query needs it, in the database as it is then. The names, the links and the version are those of the database when the source is built: after std::chrono::reload_tzdb(), build a new source.
- Returns
- A new source.
- Exceptions
-
| std::runtime_error | when the standard library cannot load its database. |