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

Legacy version of `absl&colon;&colon;TimeZone&colon;&colon;At(absl&colon;&colon;CivilSecond)` that takes the civil time as six, separate values (YMDHMS)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated(&quot;Use &grave;absl&colon;&colon;TimeZone&colon;&colon;At(CivilSecond)&grave;&period;&quot;)&rsqb;&rsqb;
xref:absl/TimeConversion.adoc[TimeConversion]
ConvertDateTime(
    int64&lowbar;t year,
    int mon,
    int day,
    int hour,
    int min,
    int sec,
    xref:absl/TimeZone.adoc[TimeZone] tz);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]: Use &grave;absl&colon;&colon;TimeZone&colon;&colon;At(CivilSecond)&grave;&period;. Use of this entity is allowed but discouraged.
====
== Description

The input month, day, hour, minute, and second values can be outside of their valid ranges, in which case they will be &quot;normalized&quot; during the conversion&period;

Example&colon;

&sol;&sol; &quot;October 32&quot; normalizes to &quot;November 1&quot;&period; absl&colon;&colon;TimeConversion tc &equals; absl&colon;&colon;ConvertDateTime(2013, 10, 32, 8, 30, 0, lax)&semi; &sol;&sol; tc&period;kind &equals;&equals; TimeConversion&colon;&colon;UNIQUE &amp;&amp; tc&period;normalized &equals;&equals; true &sol;&sol; absl&colon;&colon;ToCivilDay(tc&period;pre, tz)&period;month() &equals;&equals; 11 &sol;&sol; absl&colon;&colon;ToCivilDay(tc&period;pre, tz)&period;day() &equals;&equals; 1

Deprecated&period; Use `absl&colon;&colon;TimeZone&colon;&colon;At(CivilSecond)`&period;

== Return Value

The conversion result for the given civil time in `tz`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *year*
| The civil&hyphen;time year&period;
| *mon*
| The civil&hyphen;time month&period;
| *day*
| The civil&hyphen;time day&period;
| *hour*
| The civil&hyphen;time hour&period;
| *min*
| The civil&hyphen;time minute&period;
| *sec*
| The civil&hyphen;time second&period;
| *tz*
| The time zone to convert in&period;
|===


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