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

Convert `srcTime` to local time in `targetTimeZoneId`&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/baltzo/LocalDatetime.adoc[LocalDatetime] const& srcTime);
----

== Description

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`&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 `targetTimeZoneId` was not recognized, and a return value of `ErrorCode&colon;&colon;k&lowbar;OUT&lowbar;OF&lowbar;RANGE` indicates that the result of the operation would have been outside the range of values representable by the `result` type&period;

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *result*
| receives the converted local date&hyphen;time
| *targetTimeZoneId*
| identifier of the destination time zone
| *srcTime*
| source local date&hyphen;time to convert
|===


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