|
BDE 4.14.0 Production release
|
#include <baltzo_timezoneutilimp.h>
Static Public Member Functions | |
| static int | convertUtcToLocalTime (bdlt::DatetimeTz *result, const char *resultTimeZoneId, const bdlt::Datetime &utcTime, ZoneinfoCache *cache) |
| static void | createLocalTimePeriod (LocalTimePeriod *result, const Zoneinfo::TransitionConstIterator &transition, const Zoneinfo &timeZone) |
| static int | initLocalTime (bdlt::DatetimeTz *result, LocalTimeValidity::Enum *resultValidity, const bdlt::Datetime &localTime, const char *timeZoneId, DstPolicy::Enum dstPolicy, ZoneinfoCache *cache) |
| static int | loadLocalTimePeriodForUtc (LocalTimePeriod *result, const char *timeZoneId, const bdlt::Datetime &utcTime, ZoneinfoCache *cache) |
| static void | resolveLocalTime (bdlt::DatetimeTz *result, LocalTimeValidity::Enum *resultValidity, Zoneinfo::TransitionConstIterator *transitionIter, const bdlt::Datetime &localTime, DstPolicy::Enum dstPolicy, const Zoneinfo &timeZone) |
This struct provides a namespace for utility functions that convert time values to, and from, local time.
|
static |
Load, into the specified result, the local date-time value, in the time zone indicated by the specified resultTimeZoneId, corresponding to the specified utcTime, using time zone information supplied by the specified cache. Return 0 on success, and a non-zero value otherwise. A return status of ErrorCode::k_UNSUPPORTED_ID indicates that resultTimeZoneId is not recognized, and a return status of ErrorCode::k_OUT_OF_RANGE indicates that an out of range value of result would have occurred.
|
static |
Load, into the specified result, attributes characterizing local time indicated by the specified transition in the specified timeZone. The behavior is undefined unless ZoneinfoUtil::isWellFormed(timeZone) is true and transition is a valid, non-ending, iterator into the sequence of transitions described by timeZone.
|
static |
Load, into the specified result, the local date-time value – including the local date, time, and resolved UTC offset – indicated by the specified localTime in the time zone indicated by the specified timeZoneId, using the specified dstPolicy to interpret whether or not localTime represents a daylight-saving time value, and using time zone information supplied by the specified cache. Load, into the specified resultValidity the value indicating the whether localTime is unique, ambiguous but valid, or invalid. Return 0 on success, and a non-zero value otherwise. A return status of ErrorCode::k_UNSUPPORTED_ID indicates that timeZoneId is not recognized. The behavior is undefined unless the result of the initialization falls within the supported epoch.
|
static |
Load, into the specified result, attributes characterizing local time at the specified utcTime in the time zone indicated by the specified timeZoneId (e.g., the offset from UTC, whether it is daylight-saving time), as well as the time interval over which those attributes apply, using time zone information supplied by the specified cache. Return 0 on success, and a non-zero value otherwise. A return status of ErrorCode::k_UNSUPPORTED_ID indicates that timeZoneId is not recognized.
|
static |
Load, into the specified result, the local time and UTC offset of the specified localTime in the specified timeZone, using the specified dstPolicy to interpret whether or not localTime represents a daylight-saving time value; load into the specified resultValidity an indication of whether localTime is valid and unique, valid but ambiguous, or invalid; load into the specified transitionIter an iterator pointing to the transition that characterizes the attributes of localTime. The behavior is undefined unless ZoneinfoUtil::isWellFormed(timeZone) is true and the result of the resolution falls within the supported epoch.