Improve cross platform support.

Make validate work for C++11 because the library supports it.
Fix an unused variable mistake i made earlier.
Make constructor public, seems it should be. Possible compiler bug?
This commit is contained in:
gm
2016-06-04 13:38:50 -04:00
committed by Howard Hinnant
parent bf505cc66a
commit 7e66cb2e83
3 changed files with 12 additions and 12 deletions
+6 -6
View File
@@ -101,14 +101,14 @@ tzmain()
{
std::cout << name << '\n';
auto z = locate_zone(name);
auto begin = sys_days(jan/1/year::min()) + 0s;
auto end = sys_days(jan/1/2035) + 0s;
auto begin = sys_days(jan/1/year::min()) + seconds{0};
auto end = sys_days(jan/1/2035) + seconds{0};
auto info = z->get_info(begin);
std::cout << "Initially: ";
if (info.offset >= 0s)
if (info.offset >= seconds{0})
std::cout << '+';
std::cout << make_time(info.offset);
if (info.save == 0min)
if (info.save == minutes{0})
std::cout << " standard ";
else
std::cout << " daylight ";
@@ -128,10 +128,10 @@ tzmain()
auto ymd = year_month_day(dp);
auto time = make_time(begin - dp);
std::cout << ymd << ' ' << time << "Z ";
if (info.offset >= 0s)
if (info.offset >= seconds{0})
std::cout << '+';
std::cout << make_time(info.offset);
if (info.save == 0min)
if (info.save == minutes{0})
std::cout << " standard ";
else
std::cout << " daylight ";