39using TimeStamp = std::chrono::time_point<SystemClock>;
112uint64_t
IsoTimeToNs(
const std::string &iso_time,
bool local_time =
false);
The time namespace is used for time and date functions.
Definition timestamp.h:29
std::string NsToLocalDate(uint64_t ns_since_1970)
Formats a date string according to the local date format.
uint64_t IsoTimeToNs(const std::string &iso_time, bool local_time=false)
Converts an ISO UTC string (YYYY-MM-DD(T)hh:mm:ss to nanosecond since 1970.
std::string NsToLocalIsoTime(uint64_t ns_since_1970)
Converts a nanosecond since 1970 timestamp to a local ISO date and time string.
std::chrono::system_clock SystemClock
Convenience type definition for std::chrono::system_clock;.
Definition timestamp.h:33
std::string GetLocalTimestampWithUs(TimeStamp timestamp=SystemClock::now())
Converts a UTC timestamp to a local date and time string in the YYYY-MM-DD hh:mm:ss....
std::string NsToIsoTime(uint64_t ns_since_1970, int format=0)
Converts a nanosecond since 1970 timestamp to a UTC ISO date and time string.
std::string GetLocalDateTime(TimeStamp timestamp=SystemClock::now())
Converts a timestamp (UTC) to a local date and time string in the YYYY-MM-DD hh:mm:ss format.
uint64_t OdsDateToNs(const std::string &ods_date)
Converts an ODS date and time string to nanoseconds since 1970.
uint64_t TimeStampToNs(TimeStamp timestamp=SystemClock::now())
Converts system clock to ns since midnight 1970.
std::string GetLocalTimestampWithMs(TimeStamp timestamp=SystemClock::now())
Converts a timestamp (UTC) to a local dat and time string in the YYYY-MM-DD hh:mm:ss....
std::chrono::time_point< SystemClock > TimeStamp
Convenience type definition for std::chrono::time_point<std::chrono::system_time>;.
Definition timestamp.h:39
std::string NsToLocalTime(uint64_t ns_since_1970, int format=0)
Formats a time string according to the local time format.
uint64_t FileTimeToNs(std::filesystem::file_time_type time)
Converts from std::filesystem file_clock to ns since 1970.