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

`convertLocalToUtc` overloads

== Synopses

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

Load, into the specified `result`, the UTC time value that corresponds to the specified `localTime` in the time zone indicated by the specified `timeZoneId`&period; Optionally specify a `dstPolicy` indicating whether or not `localTime` represents a daylight&hyphen;saving time value&period; If `dstPolicy` is unspecified and `localTime` 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 `localTime` is either ambiguous or invalid, then use the later of the two possible interpretations of `localTime`&period; The offset from UTC of the time zone 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 `timeZoneId` was not recognized&period; The behavior is undefined unless the result of the conversion falls within the supported epoch&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baltzo/TimeZoneUtil/convertLocalToUtc-0b.adoc[convertLocalToUtc](
    xref:BloombergLP/bdlt/Datetime.adoc[bdlt::Datetime]* result,
    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);
----

[.small]#xref:BloombergLP/baltzo/TimeZoneUtil/convertLocalToUtc-0b.adoc[_» more&period;&period;&period;_]#

Load a `LocalDatetime` UTC result&semi; see the primary `convertLocalToUtc` overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/baltzo/TimeZoneUtil/convertLocalToUtc-00.adoc[convertLocalToUtc](
    xref:BloombergLP/baltzo/LocalDatetime.adoc[LocalDatetime]* result,
    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);
----

[.small]#xref:BloombergLP/baltzo/TimeZoneUtil/convertLocalToUtc-00.adoc[_» more&period;&period;&period;_]#


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