[#absl-ParseTime-09]
= xref:absl.adoc[absl]::ParseTime
:relfileprefix: ../
:mrdocs:

`ParseTime` overloads

== Synopses

Declared in `&lt;absl&sol;time&sol;time&period;h&gt;`

Parses an input string according to the provided format string and returns the corresponding `absl&colon;&colon;Time`&period; Uses strftime()&hyphen;like formatting options, with the same extensions as FormatTime(), but with the exceptions that %E&num;S is interpreted as %E_S, and %E&num;f as %E_f&period; %Ez and %E&ast;z also accept the same inputs, which (along with %z) includes &apos;z&apos; and &apos;Z&apos; as synonyms for &plus;00&colon;00&period; %ET accepts either &apos;T&apos; or &apos;t&apos;&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:absl/ParseTime-06.adoc[ParseTime](
    std::string&lowbar;view format,
    std::string&lowbar;view input,
    xref:absl/Time.adoc[Time]* time,
    std::string* err);
----

[.small]#xref:absl/ParseTime-06.adoc[_» more&period;&period;&period;_]#

Like ParseTime() above, but if the format string does not contain a UTC offset specification (%z&sol;%Ez&sol;%E&ast;z) then the input is interpreted in the given TimeZone&period; This means that the input, by itself, does not identify a unique instant&period; Being time&hyphen;zone dependent, it also admits the possibility of ambiguity or non&hyphen;existence, in which case the &quot;pre&quot; time (as defined by TimeZone&colon;&colon;TimeInfo) is returned&period; For these reasons we recommend that all date&sol;time strings include a UTC offset so they&apos;re context independent&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:absl/ParseTime-00.adoc[ParseTime](
    std::string&lowbar;view format,
    std::string&lowbar;view input,
    xref:absl/TimeZone.adoc[TimeZone] tz,
    xref:absl/Time.adoc[Time]* time,
    std::string* err);
----

[.small]#xref:absl/ParseTime-00.adoc[_» more&period;&period;&period;_]#

== Return Value

`true` upon successful parsing&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *format*
| The strftime()&hyphen;like format string&period;
| *input*
| The string to parse&period;
| *time*
| Output parameter receiving the parsed time&period;
| *err*
| Output parameter receiving an error message on failure&period;
| *tz*
| The time zone to interpret the input in when no offset is present&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
