mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-05 13:44:26 +02:00
Updated Examples and Recipes (markdown)
@@ -381,7 +381,7 @@ Let's say you want to search the globe, and all time, for time zones when the da
|
||||
auto end = sys_days{jan/1/2035} + 0s;
|
||||
do
|
||||
{
|
||||
auto info = z.get_info(begin, tz::utc);
|
||||
auto info = z.get_info(begin);
|
||||
if (info.save != 0h && info.save != 1h)
|
||||
{
|
||||
std::cout << z.name() << " has a daylight savings offset of "
|
||||
@@ -396,9 +396,9 @@ Let's say you want to search the globe, and all time, for time zones when the da
|
||||
|
||||
You first get a reference to the tz database, then iterate over each zone in the database. For each zone, set a range of time points to search over. In this example I start searching as far back as possible, and search forward to the year 2035.
|
||||
|
||||
Starting at the beginning of time, get an `Info` for that UTC `time_point`. An `Info` looks like this:
|
||||
Starting at the beginning of time, get an `sys_info` for that UTC `time_point`. An `sys_info` looks like this:
|
||||
|
||||
struct Info
|
||||
struct sys_info
|
||||
{
|
||||
second_point begin;
|
||||
second_point end;
|
||||
|
Reference in New Issue
Block a user