Updated Examples and Recipes (markdown)

HowardHinnant
2016-03-22 22:28:24 -04:00
parent 9457f20876
commit 53b482f997

@@ -384,7 +384,7 @@ Let's say you want to search the globe, and all time, for time zones when the da
auto info = z.get_info(begin, tz::utc); auto info = z.get_info(begin, tz::utc);
if (info.save != 0h && info.save != 1h) if (info.save != 0h && info.save != 1h)
{ {
std::cout << z.name() << " has an daylight savings offset of " std::cout << z.name() << " has a daylight savings offset of "
<< info.save.count() << "min from " << info.begin << info.save.count() << "min from " << info.begin
<< " UTC to " << info.end << " UTC with the abbreviation " << " UTC to " << info.end << " UTC with the abbreviation "
<< info.abbrev << '\n'; << info.abbrev << '\n';
@@ -415,6 +415,12 @@ To increment the loop, set the local variable `begin` to `info.end`, and look up
It is really remarkably simple to search the globe and and all time for interesting chronological events related to timezone transitions. It is really remarkably simple to search the globe and and all time for interesting chronological events related to timezone transitions.
Sample output of this program:
Africa/Accra has a daylight savings offset of 20min from 1920-09-01 00:00:00 UTC to 1920-12-30 23:40:00 UTC with the abbreviation GHST
...
*** ***
![CC BY Logo](http://mirrors.creativecommons.org/presskit/buttons/80x15/svg/by.svg) _This work is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/)._ ![CC BY Logo](http://mirrors.creativecommons.org/presskit/buttons/80x15/svg/by.svg) _This work is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/)._