Libosmium
2.2.0
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <timestamp.hpp>
Public Member Functions | |
constexpr | Timestamp () noexcept |
constexpr | Timestamp (time_t timestamp) noexcept |
Timestamp (const char *timestamp) | |
constexpr time_t | seconds_since_epoch () const noexcept |
constexpr | operator time_t () const noexcept |
constexpr | operator uint32_t () const noexcept |
template<typename T > | |
void | operator+= (T time_difference) noexcept |
template<typename T > | |
void | operator-= (T time_difference) noexcept |
std::string | to_iso () const |
Static Private Member Functions | |
static const char * | timestamp_format () |
Private Attributes | |
uint32_t | m_timestamp |
Static Private Attributes | |
static constexpr int | timestamp_length = 20 + 1 |
A timestamp. Internal representation is an unsigned 32bit integer holding seconds since epoch, so this will overflow in 2038.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineexplicit |
Construct timestamp from ISO date/time string. Throws std::invalid_argument, if the timestamp can not be parsed.
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestaticprivate |
The timestamp format for OSM timestamps in strftime(3) format. This is the ISO-Format yyyy-mm-ddThh:mm:ssZ
|
inline |
Return UTC Unix time as string in ISO date/time format.
|
private |
|
staticprivate |