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

Provide conversions between absolute datetimes and epoch&hyphen;relative intervals&period;

== Synopsis

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

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

== Description

This `struct` provides a namespace for a suite of non&hyphen;primitive functions providing conversions between absolute `Datetime` values and corresponding relative time intervals with respect to the Unix standard epoch time, returned by the `epoch` method&period; These methods are alias&hyphen;safe, thread&hyphen;safe, and exception&hyphen;neutral&period; Functions are provided for returning converted values by value or through a result pointer&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/EpochUtil/TimeT64.adoc[`TimeT64`] 
| Alias for a 64&hyphen;bit integer counting UTC seconds from the epoch&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlt/EpochUtil/convertFromDatetimeInterval-03.adoc[`convertFromDatetimeInterval`] 
| `convertFromDatetimeInterval` overloads
| xref:BloombergLP/bdlt/EpochUtil/convertFromTimeInterval-00.adoc[`convertFromTimeInterval`] 
| `convertFromTimeInterval` overloads
| xref:BloombergLP/bdlt/EpochUtil/convertFromTimeT-05.adoc[`convertFromTimeT`] 
| `convertFromTimeT` overloads
| xref:BloombergLP/bdlt/EpochUtil/convertFromTimeT64-0a.adoc[`convertFromTimeT64`] 
| `convertFromTimeT64` overloads
| xref:BloombergLP/bdlt/EpochUtil/convertToDatetimeInterval-00.adoc[`convertToDatetimeInterval`] 
| `convertToDatetimeInterval` overloads
| xref:BloombergLP/bdlt/EpochUtil/convertToTimeInterval-0f.adoc[`convertToTimeInterval`] 
| `convertToTimeInterval` overloads
| xref:BloombergLP/bdlt/EpochUtil/convertToTimeT-05.adoc[`convertToTimeT`] 
| `convertToTimeT` overloads
| xref:BloombergLP/bdlt/EpochUtil/convertToTimeT64-04.adoc[`convertToTimeT64`] 
| `convertToTimeT64` overloads
| xref:BloombergLP/bdlt/EpochUtil/epoch.adoc[`epoch`] 
| Return a reference to the Unix epoch (1970&hyphen;01&hyphen;01 00&colon;00&colon;00)&period;
|===



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