[#BloombergLP-bdlt-LocalTimeOffset]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::LocalTimeOffset
:relfileprefix: ../../
:mrdocs:

This `struct` provides a namespace for local&hyphen;time&hyphen;offset procedures including a configurable global callback mechanism&period; The use of these procedures is thread&hyphen;safe (see `Thread Safety`)&period;

== Synopsis

Declared in `&lt;bdlt&lowbar;localtimeoffset&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct LocalTimeOffset;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/LocalTimeOffset/LocalTimeOffsetCallback-08.adoc[`LocalTimeOffsetCallback`] 
| `LocalTimeOffsetCallback` is an alias for the type of a function that returns a `bsls&colon;&colon;TimeInterval` value representing the difference between local time and UTC time at the specified `utcDatetime`&period; This function must be thread&hyphen;safe in multi&hyphen;threaded builds&period; Note that the installed callback function must have geographic information specifying the local timezone&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/LocalTimeOffset/localTimeOffset.adoc[`localTimeOffset`] 
| Return a `bsls&colon;&colon;TimeInterval` value representing the difference between local time and UTC time at the specified `utcDatetime`&period; This method uses the currently installed local&hyphen;time&hyphen;offset callback mechanism&period;
| xref:BloombergLP/bdlt/LocalTimeOffset/localTimeOffsetCallback-04.adoc[`localTimeOffsetCallback`] 
| Return the currently installed `LocalTimeOffsetCallback` function&period;
| xref:BloombergLP/bdlt/LocalTimeOffset/localTimeOffsetDefault.adoc[`localTimeOffsetDefault`] 
| Return a `bsls&colon;&colon;TimeInterval` value representing the difference between local time and UTC time at the specified `utcDatetime`&period; Note that the local time zone is determined by the `TZ` environment variable in the same manner as the `localtime` POSIX function&period;
| xref:BloombergLP/bdlt/LocalTimeOffset/setLocalTimeOffsetCallback.adoc[`setLocalTimeOffsetCallback`] 
| Set the specified `callback` as the function to be used to return a `bsls&colon;&colon;TimeInterval` value representing the difference between local time and UTC time at a specified UTC date and time&period; Return the previously installed `LocalTimeOffsetCallback` function&period; The behavior is undefined unless `0 !&equals; callback`&period;
|===



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