The timeTools namespace.
More...
◆ convertIsoToUnixTimestamp()
time_t timeTools::convertIsoToUnixTimestamp |
( |
const std::string & |
s | ) |
|
Converts a UTC time (given in seconds) represented by a string to a UTC time represented by a time_t type.
- Parameters
-
s | A std::string to process. |
- Returns
- The ISO converted to unix timestamp.
◆ convertUnixTimestampToIso()
std::string timeTools::convertUnixTimestampToIso |
( |
time_t |
ts | ) |
|
Convert an Unix timestamp which is given in microseconds into a date in ISO format. Convert an Unix timestamp which is given in seconds into a date in ISO format.
- Parameters
-
- Returns
- The unix converted timestamp to ISO.
◆ timegm()
time_t timeTools::timegm |
( |
std::tm const & |
t | ) |
|
Converts a UTC time represented by a tm``struct to a UTC time represented by a time_t type.
- Parameters
-
[in,out] | tm | If non-null, the time. |
- Returns
- A time_t.
◆ to_calendar_time()
template<typename Clock , typename Duration >
std::tm timeTools::to_calendar_time |
( |
std::chrono::time_point< Clock, Duration > |
tp | ) |
|