Derivation of mira::Time with human-readable serialization.
More...
#include <utils/TimeHumanReadable.h>
template<bool AsString = true>
class mira::HumanReadableSerialization::Time< AsString >
Derivation of mira::Time with human-readable serialization.
Specialized as TimeSerializedAsIsoString, TimeSerializedAsYMDHMS
◆ Base
◆ Time() [1/2]
◆ Time() [2/2]
◆ reflectRead()
◆ reflectWrite()
void reflectWrite |
( |
Reflector & |
r | ) |
|
|
inline |
◆ reflect()
◆ now()
◆ invalid()
◆ unixEpoch()
static Time unixEpoch |
( |
| ) |
|
|
inlinestaticinherited |
Returns the unix epoch 1.1.1970 0:0:0.000.
- Returns
- Unix epoch time.
◆ toUnixTimestamp()
uint32 toUnixTimestamp |
( |
| ) |
const |
|
inlineinherited |
Converts the current time to a unix timestamp in seconds.
- Returns
- timestamp in seconds.
◆ fromUnixTimestamp()
static Time fromUnixTimestamp |
( |
uint32 |
seconds | ) |
|
|
inlinestaticinherited |
Creates a time representation out of a unix timestamp.
- Parameters
-
[in] | seconds | The unix timestamp in seconds. |
◆ toUnixNS()
uint64 toUnixNS |
( |
| ) |
const |
|
inlineinherited |
Converts the current time to a unix timestamp in nanoseconds.
- Returns
- timestamp in nanoseconds.
◆ fromUnixNS()
static Time fromUnixNS |
( |
uint64 |
nanoseconds | ) |
|
|
inlinestaticinherited |
Creates a time representation out of a unix timestamp.
- Parameters
-
[in] | nanoseconds | The unix timestamp in nanoseconds. |
◆ toLocal()
Converts to local time zone based on the settings of the machine.
- Returns
- The time in local time zone.
◆ toTimeZone()
Time toTimeZone |
( |
const std::string & |
zone | ) |
|
|
inlineinherited |
Converts to given time zone.
- Parameters
-
[in] | zone | The time zone to convert to e.g. "CET+1" (= name CET, 1 hour ahead of GMT). |
- Returns
- The time in the requested time zone.
◆ isValid()
Returns true if this contains a valid time.
- Returns
- true if this is a valid time, false otherwise
◆ operator-() [1/3]
◆ operator-() [2/3]
◆ operator-() [3/3]
◆ operator+() [1/2]
◆ operator+() [2/2]
◆ operator+=() [1/2]
◆ operator+=() [2/2]
◆ operator-=() [1/2]
◆ operator-=() [2/2]
The documentation for this class was generated from the following file: