All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Static Public Member Functions | List of all members
Akumuli::DateTimeUtil Struct Reference

Static utility class for date-time utility functions. More...

#include <datetime.h>

Static Public Member Functions

static aku_Timestamp from_std_chrono (std::chrono::system_clock::time_point timestamp)
static aku_Timestamp from_boost_ptime (boost::posix_time::ptime timestamp)
static boost::posix_time::ptime to_boost_ptime (aku_Timestamp timestamp)
static aku_Timestamp from_iso_string (const char *iso_str)
static int to_iso_string (aku_Timestamp ts, char *buffer, size_t buffer_size)
static aku_Duration parse_duration (const char *str, size_t size)

Detailed Description

Static utility class for date-time utility functions.

Member Function Documentation

aku_Timestamp Akumuli::DateTimeUtil::from_iso_string ( const char *  iso_str)

Convert ISO formatter timestamp to aku_Timestamp value.

This function implements ISO 8601 partially compatible parser. Most of the standard is not supported yet - extended formatting (only basic format is supported), fractions on minutes or hours ( like "20150102T1230.999"), timezones (values is treated as UTC time).
aku_Duration Akumuli::DateTimeUtil::parse_duration ( const char *  str,
size_t  size 

Parse time-duration from string

BadDateTimeFormaton error
int Akumuli::DateTimeUtil::to_iso_string ( aku_Timestamp  ts,
char *  buffer,
size_t  buffer_size 

Convert timestamp to string.

The documentation for this struct was generated from the following files: