From 4aacc0b0b37798d056c8519cf1d762991bc4a7a3 Mon Sep 17 00:00:00 2001
From: Howard Hinnant
Howard E. Hinnant
-2016-09-13
+2016-09-14
Time Zone Database Parser
@@ -709,7 +709,7 @@ convert(const std::string& input)
using namespace date;
istringstream stream{input};
sys_time<milliseconds> t;
- parse(stream, "%a %b %d %T %z %Y", t);
+ stream >> parse("%a %b %d %T %z %Y", t);
if (stream.fail())
throw runtime_error("failed to parse " + input);
return format("%FT%TZ", t);
@@ -2320,6 +2320,13 @@ or local_time
, one could make a list of potential time_zone
Given a UTC offset, one might even narrow that list down further.
Furthermore, for every signature
+parse(std::basic_istream<CharT, Traits>& is, Args...)
there exists
+an input manipulator parse(Args...)
that can be used like this:
+
+istream >> parse("%F %T", tp); +
utc_clock