AWS IoT Device SDK C++ v2
1.34.0
AWS IoT Device SDK C++ v2
|
#include <DateTime.h>
Public Member Functions | |
DateTime () noexcept | |
DateTime (const std::chrono::system_clock::time_point &timepointToAssign) noexcept | |
DateTime (uint64_t millisSinceEpoch) noexcept | |
DateTime (double epoch_millis) noexcept | |
DateTime (const char *timestamp, DateFormat format) noexcept | |
bool | operator== (const DateTime &other) const noexcept |
bool | operator< (const DateTime &other) const noexcept |
bool | operator> (const DateTime &other) const noexcept |
bool | operator!= (const DateTime &other) const noexcept |
bool | operator<= (const DateTime &other) const noexcept |
bool | operator>= (const DateTime &other) const noexcept |
DateTime | operator+ (const std::chrono::milliseconds &a) const noexcept |
DateTime | operator- (const std::chrono::milliseconds &a) const noexcept |
DateTime & | operator= (double secondsSinceEpoch) noexcept |
DateTime & | operator= (uint64_t millisSinceEpoch) noexcept |
DateTime & | operator= (const std::chrono::system_clock::time_point &timepointToAssign) noexcept |
DateTime & | operator= (const char *timestamp) noexcept |
operator bool () const noexcept | |
int | GetLastError () const noexcept |
bool | ToLocalTimeString (DateFormat format, ByteBuf &outputBuf) const noexcept |
bool | ToGmtString (DateFormat format, ByteBuf &outputBuf) const noexcept |
double | SecondsWithMSPrecision () const noexcept |
uint64_t | Millis () const noexcept |
std::chrono::system_clock::time_point | UnderlyingTimestamp () const noexcept |
uint16_t | GetYear (bool localTime=false) const noexcept |
Month | GetMonth (bool localTime=false) const noexcept |
uint8_t | GetDay (bool localTime=false) const noexcept |
DayOfWeek | GetDayOfWeek (bool localTime=false) const noexcept |
uint8_t | GetHour (bool localTime=false) const noexcept |
uint8_t | GetMinute (bool localTime=false) const noexcept |
uint8_t | GetSecond (bool localTime=false) const noexcept |
bool | IsDST (bool localTime=false) const noexcept |
std::chrono::milliseconds | operator- (const DateTime &other) const noexcept |
Static Public Member Functions | |
static DateTime | Now () noexcept |
|
noexcept |
Initializes time point to epoch
|
noexcept |
Initializes time point to any other arbitrary timepoint
|
noexcept |
Initializes time point to millis Since epoch
|
noexcept |
Initializes time point to epoch time in seconds.millis
|
noexcept |
Initializes time point to value represented by timestamp and format.
|
noexcept |
Get the Day of the Month portion of this dateTime. localTime if true, return local time, otherwise return UTC
|
noexcept |
Get the Day of the Week portion of this dateTime. localTime if true, return local time, otherwise return UTC
|
noexcept |
Get the Hour portion of this dateTime. localTime if true, return local time, otherwise return UTC
|
noexcept |
|
noexcept |
Get the Minute portion of this dateTime. localTime if true, return local time, otherwise return UTC
|
noexcept |
Get the Month portion of this dateTime. localTime if true, return local time, otherwise return UTC
|
noexcept |
Get the Second portion of this dateTime. localTime if true, return local time, otherwise return UTC
|
noexcept |
Get the Year portion of this dateTime. localTime if true, return local time, otherwise return UTC
|
noexcept |
Get whether or not this dateTime is in Daylight savings time. localTime if true, return local time, otherwise return UTC
|
noexcept |
Milliseconds since epoch of this datetime.
|
staticnoexcept |
Get an instance of DateTime representing this very instant.
|
explicitnoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Computes the difference between two DateTime instances and returns the difference in milliseconds.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Assign from an ISO8601 or RFC822 formatted string
|
noexcept |
Assign from another time_point
|
noexcept |
Assign from seconds.millis since epoch.
|
noexcept |
Assign from millis since epoch.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Get the representation of this datetime as seconds.milliseconds since epoch
|
noexcept |
Convert dateTime to GMT time string using predefined format.
|
noexcept |
Convert dateTime to local time string using predefined format.
|
noexcept |
In the likely case this class doesn't do everything you need to do, here's a copy of the time_point structure. Have fun.