This struct provides a namespace for a bdlt::LocalTimeOffset local time offset callback, and functions that manage the timezone information reported by that callback. All public methods are thread‐safe.

Synopsis

Declared in <baltzo_localtimeoffsetutil.h>

struct LocalTimeOffsetUtil;

Static Member Functions

Name

Description

configure

configure overloads

loadLocalTimeOffset

Efficiently load to the specified result the offset of the local time from UTC for the specified utcDatetime. This function is thread‐safe. The behavior is undefined unless the local time zone has been previously established by a call to the configure method. This method is thread‐safe. Note that this function is no longer used as a callback function. It exisis for backwards compatibility with code that called it directly, and is deprecated.

loadLocalTimePeriod

Load to the specified localTimePeriod the local time period information currently used by the localTimeOffset method. That information is updated when localTimeOffset is called with a utcDatetime outside the range localTimePeriod().utcStartTime() (inclusive) localTimePeriod().utcEndTime() (exclusive). This method is not thread‐safe. The behavior is undefined if this method is invoked before the successful invocation of a configure method.

loadTimezone

loadTimezone overloads

localTimeOffset

Return the offset of the local time from UTC for the specified utcDatetime. This function is thread‐safe. The behavior is undefined unless the local time zone has been previously established by a call to the configure method. This method is thread‐safe.

setLoadLocalTimeOffsetCallback

Set localTimeOffset as the local time offset callback of bdlt::CurrentTime. Return the previously installed callback. This method is not thread‐safe.

updateCount

Return the number of successful updates of the local time period information since the start of the process. This count is incremented on calls to any of the setTimeZone methods and when loadLocalTimePeriod is called with a utcDatetime outside the range of the current local time period information. This method is thread‐safe.

Created with MrDocs