diff --git a/tz.html b/tz.html
index c632416..165b6e1 100644
--- a/tz.html
+++ b/tz.html
@@ -26,7 +26,7 @@
Howard E. Hinnant
-2016-05-20
+2016-05-22
This work is licensed
@@ -2088,11 +2088,39 @@ For the overloads taking a zoned_time
it is the value returned by
parse
++One can parse in a
+sys_time<Duration>
or a +local_time<Duration>
. Optionally, one can also pass in a reference +to astd::string
in order to capture the time zone abbreviation, or one +can pass in a reference to astd::chrono::minutes
to capture a time zone +UTC offset (formatted as+0000
), or one can pass in both in either order. +template <class Duration> void parse(std::istream& is, const std::string& format, sys_time<Duration>& tp); +template <class Duration> +void +parse(std::istream& is, const std::string& format, sys_time<Duration>& tp, + std::string& abbrev); + +template <class Duration> +void +parse(std::istream& is, const std::string& format, sys_time<Duration>& tp, + std::chrono::minutes& offset); + +template <class Duration> +void +parse(std::istream& is, const std::string& format, sys_time<Duration>& tp, + std::string& abbrev, std::chrono::minutes& offset); + +template <class Duration> +void +parse(std::istream& is, const std::string& format, sys_time<Duration>& tp, + std::chrono::minutes& offset, std::string& abbrev); + template <class Duration> void parse(std::istream& is, const std::string& format, local_time<Duration>& tp); @@ -2101,13 +2129,29 @@ template <class Duration> void parse(std::istream& is, const std::string& format, local_time<Duration>& tp, std::string& abbrev); + +template <class Duration> +void +parse(std::istream& is, const std::string& format, local_time<Duration>& tp, + std::chrono::minutes& offset); + +template <class Duration> +void +parse(std::istream& is, const std::string& format, local_time<Duration>& tp, + std::string& abbrev, std::chrono::minutes& offset); + +template <class Duration> +void +parse(std::istream& is, const std::string& format, local_time<Duration>& tp, + std::chrono::minutes& offset, std::string& abbrev);Effects: These functions attempt to parse a
time_point
out ofis
according toformat
. If the parse is unsuccessful, callsis.setstate(std::ios::failbit)
which may throw an exception. -tp
is altered only in the event of a successful parse. +tp
,abbrev
, andoffset
are altered only in +the event of a successful parse.@@ -2126,27 +2170,35 @@ contributes to the time stamp as if
If
%z
appears in theformat
string and an offset is -successfully parsed, the first overload (sys_time
) interprets the +successfully parsed, the overloads takingsys_time
interprets the parsed time as a local time and subtracts the offset prior to assigning the value totp
, resulting in a value oftp
representing a -UTC timestamp. The second and third overloads require a valid parse of the -offset, but then ignore the offset in assigning a value to the -local_time<Duration>& tp
. +UTC timestamp. The overloads takinglocal_time
require a valid +parse of the offset, but then ignore the offset in assigning a value to the +local_time<Duration>& tp
. Ifoffset
is +passed in, on successful parse it will hold the value represented by +%z
if present, or will be assigned0min
if +%z
is not present.-If
%Z
appears in theformat
string then an abbreviation -is required in that position for a successful parse. However the parsed abbreviation -does not have to be a valid time zone abbreviation, and has no impact on the value -parsed intotp
. Using the third overload one can discover what that -parsed abbreviation is. If the third overload is used, but%Z
does -not appear in the format, thenabbrev
is not altered. +If%Z
appears in theformat
string then an +abbreviation is required in that position for a successful parse. The +abbreviation will be parsed as astd::string
(delimited by white +space). The parsed abbreviation does not have to be a valid time zone +abbreviation, and has no impact on the value parsed intotp
. Using +the overloads that take astd::string&
one can discover what +that parsed abbreviation is. On successful parse,abbrev
will be +assigned the value represented by%Z
if present, or assigned the +empty string if%Z
is not present.Note: There is no unique mapping from a time zone abbreviation to a -
time_zone
. +time_zone
. But given a time zone abbreviation and asys_time
+orlocal_time
, one could make a list of potentialtime_zone
s. +Given a UTC offset, one might even narrow that list down further.