[#BloombergLP-baltzo-TimeZoneUtil-initLocalTime-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baltzo.adoc[baltzo]::xref:BloombergLP/baltzo/TimeZoneUtil.adoc[TimeZoneUtil]::initLocalTime
:relfileprefix: ../../../
:mrdocs:

Initialize a `bdlt&colon;&colon;DatetimeTz` result and load validity&semi; see the primary `initLocalTime` overload&period;

== Synopsis

Declared in `&lt;baltzo&lowbar;timezoneutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
initLocalTime(
    xref:BloombergLP/bdlt/DatetimeTz.adoc[bdlt::DatetimeTz]* result,
    xref:BloombergLP/baltzo/LocalTimeValidity/Enum.adoc[LocalTimeValidity::Enum]* resultValidity,
    xref:BloombergLP/bdlt/Datetime.adoc[bdlt::Datetime] const& localTime,
    char const* timeZoneId,
    xref:BloombergLP/baltzo/DstPolicy/Enum.adoc[DstPolicy::Enum] dstPolicy = DstPolicy&colon;&colon;e&lowbar;UNSPECIFIED);
----

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *result*
| receives the initialized local date&hyphen;time
| *resultValidity*
| receives the validity of `localTime`
| *localTime*
| local date&hyphen;time to interpret
| *timeZoneId*
| identifier of the time zone for `localTime`
| *dstPolicy*
| daylight&hyphen;saving policy for interpreting `localTime`
|===


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