Convert utcTime to local time in timeZone.
Synopsis
Declared in <baltzo_zoneinfoutil.h>
static
int
convertUtcToLocalTime(
bdlt::DatetimeTz* resultTime,
Zoneinfo::TransitionConstIterator* resultTransition,
bdlt::Datetime const& utcTime,
Zoneinfo const& timeZone);
Description
Load, into the specified resultTime, the local date‐time value, in the specified timeZone, corresponding to the specified utcTime, and load, into the specified resultTransition, an iterator referring to the first transition in timeZone whose transition‐time is before utcTime. Return 0 on success, and baltzo::ErrorCode::k_OUT_OF_RANGE if resultTime would be outside of the legal range that a bdlt::DatetimeTz can represent. The behavior is undefined unless isWellFormed(timeZone) is true.
Return Value
0 on success, and baltzo::ErrorCode::k_OUT_OF_RANGE if resultTime would be outside the legal bdlt::DatetimeTz range
Parameters
Name |
Description |
resultTime |
receives the converted local date‐time |
resultTransition |
receives the first transition before |
utcTime |
UTC date‐time to convert |
timeZone |
time zone used for the conversion |
Created with MrDocs