This struct provides a namespace for a suite of non‐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. These methods are alias‐safe, thread‐safe, and exception‐neutral. Functions are provided for returning converted values by value or through a result pointer.

Synopsis

Declared in <bdlt_epochutil.h>

struct EpochUtil;

Type Aliases

Name

Description

TimeT64

TimeT64 is an alias for a 64‐bit integral type representing seconds from the epoch in UTC. Note that, in contrast with bsl::time_t, this type can be used in conversions to and from Datetime values that are less than the epoch (corresponding to negative TimeT64 values).

Static Member Functions

Name

Description

convertFromDatetimeInterval

convertFromDatetimeInterval overloads

convertFromTimeInterval

convertFromTimeInterval overloads

convertFromTimeT

convertFromTimeT overloads

convertFromTimeT64

convertFromTimeT64 overloads

convertToDatetimeInterval

convertToDatetimeInterval overloads

convertToTimeInterval

convertToTimeInterval overloads

convertToTimeT

convertToTimeT overloads

convertToTimeT64

convertToTimeT64 overloads

epoch

Return a reference providing non‐modifiable access to the epoch time: midnight on January 1, 1970. Note that this value exists before any code is executed and will continue to exist, unchanged, until the program exits.

Created with MrDocs