[#BloombergLP-baltzo-TimeZoneUtil-convertLocalToLocalTime-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baltzo.adoc[baltzo]::xref:BloombergLP/baltzo/TimeZoneUtil.adoc[TimeZoneUtil]::convertLocalToLocalTime
:relfileprefix: ../../../
:mrdocs:

Load, into the specified `result`, the local date&hyphen;time value (in the time zone indicated by the specified `targetTimeZoneId`) corresponding to the local time indicated by the specified `srcTime` (in the time zone indicated by the specified `srcTimeZoneId`)&period; Optionally specify a `dstPolicy` indicating whether or not `srcTime` represents a daylight&hyphen;saving time value&period; If `dstPolicy` is unspecified and `srcTime` is a unique and valid time in the source time zone, then perform the conversion using that uniquely described time&semi; if `dstPolicy` is unspecified and `srcTime` is either ambiguous or invalid, then use the later of the two possible interpretations of `srcTime`&period; The offset from UTC of both time zones is rounded down to minute precision&period; Return 0 on success, and a non&hyphen;zero value with no effect otherwise&period; A return value of `ErrorCode&colon;&colon;k&lowbar;UNSUPPORTED&lowbar;ID` indicates that either `targetTimeZoneId` or `srcTimeZoneId` was not recognized&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
convertLocalToLocalTime(
    xref:BloombergLP/baltzo/LocalDatetime.adoc[LocalDatetime]* result,
    char const* targetTimeZoneId,
    xref:BloombergLP/bdlt/Datetime.adoc[bdlt::Datetime] const& srcTime,
    char const* srcTimeZoneId,
    xref:BloombergLP/baltzo/DstPolicy/Enum.adoc[DstPolicy::Enum] dstPolicy = DstPolicy&colon;&colon;e&lowbar;UNSPECIFIED);
----


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