#include <DateAndTime.h>
Public Member Functions | |
uint32_t | code (void) const |
uint32_t | code (void) const |
DateAndTime (uint32_t val) | |
DateAndTime () | |
DateAndTime (uint32_t val) | |
DateAndTime () | |
std::string | human (void) const |
std::string | human (void) const |
std::string | iso8601 (void) const |
std::string | iso8601 (void) const |
Private Attributes | |
uint32_t | m_val |
my current value |
|
Default constructor, it means, now 00017 : m_val(time(0)) 00018 { 00019 }
|
|
Build from an existing date in time
00022 : m_val(val) 00023 { 00024 }
|
|
Default constructor, it means, now |
|
Build from an existing date in time
|
|
Get the current representation 00045 { return m_val; }
|
|
Get the current representation 00045 { return m_val; }
|
|
Returns a string that represents the time in a human readable format |
|
Returns a string that represents the time in a human readable format 00037 { 00038 struct tm t; 00039 time_t val = code(); 00040 gmtime_r(&val, &t); 00041 char buf[100]; 00042 strftime(buf, 100, "%a, %d %b %Y %H:%M:%S UTC", &t); 00043 return buf; 00044 }
|
|
Returns a string that represents the time in ISO8601 |
|
Returns a string that represents the time in ISO8601 00027 { 00028 struct tm t; 00029 time_t val = code(); 00030 gmtime_r(&val, &t); 00031 char buf[100]; 00032 strftime(buf, 100, "%Y-%m-%dT%H:%M:%SZ", &t); 00033 return buf; 00034 }
|
|
my current value
|