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

Provide a namespace for current&hyphen;time retrieval procedures&period;

== Synopsis

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

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

== Description

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

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/CurrentTime/CurrentTimeCallback-02.adoc[`CurrentTimeCallback`] 
| Callback function type that returns the current time as a time interval&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/CurrentTime/asDatetimeTz.adoc[`asDatetimeTz`] 
| Return the current local date&sol;time with its UTC offset&period;
| xref:BloombergLP/bdlt/CurrentTime/currentTimeCallback-0c.adoc[`currentTimeCallback`] 
| Return the installed function used to retrieve the interval between `EpochUtil&colon;&colon;epoch()` and the current date&sol;time&period;
| xref:BloombergLP/bdlt/CurrentTime/currentTimeDefault.adoc[`currentTimeDefault`] 
| Provide the default current&hyphen;time callback implementation&period;
| xref:BloombergLP/bdlt/CurrentTime/local.adoc[`local`] 
| Return the current date&sol;time in the local time zone&period;
| xref:BloombergLP/bdlt/CurrentTime/now.adoc[`now`] 
| Return the current date&sol;time as a time interval from the epoch&period;
| xref:BloombergLP/bdlt/CurrentTime/setCurrentTimeCallback.adoc[`setCurrentTimeCallback`] 
| Set the callback used to retrieve the current time&period;
| xref:BloombergLP/bdlt/CurrentTime/utc.adoc[`utc`] 
| Return the current date&sol;time in Coordinated Universal Time (UTC)&period;
|===



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