AWS SDK for C++
0.14.3
AWS SDK for C++
|
#include <DateTime.h>
Public Member Functions | |
DateTime () | |
DateTime (const std::chrono::system_clock::time_point &timepointToAssign) | |
DateTime (int64_t millisSinceEpoch) | |
DateTime (double epoch_millis) | |
DateTime (const Aws::String ×tamp, DateFormat format) | |
DateTime (const char *timestamp, DateFormat format) | |
bool | operator== (const DateTime &other) const |
bool | operator< (const DateTime &other) const |
bool | operator> (const DateTime &other) const |
bool | operator!= (const DateTime &other) const |
bool | operator<= (const DateTime &other) const |
bool | operator>= (const DateTime &other) const |
DateTime & | operator= (double secondsSinceEpoch) |
DateTime & | operator= (int64_t millisSinceEpoch) |
DateTime & | operator= (const std::chrono::system_clock::time_point &timepointToAssign) |
bool | WasParseSuccessful () |
Aws::String | ToLocalTimeString (DateFormat format) const |
Aws::String | ToLocalTimeString (const char *formatStr) const |
Aws::String | ToGmtString (DateFormat format) const |
Aws::String | ToGmtString (const char *formatStr) const |
double | SecondsWithMSPrecision () const |
int64_t | Millis () const |
std::chrono::system_clock::time_point | UnderlyingTimestamp () const |
int | GetYear (bool localTime=false) const |
Month | GetMonth (bool localTime=false) const |
int | GetDay (bool localTime=false) const |
DayOfWeek | GetDayOfWeek (bool localTime=false) const |
int | GetHour (bool localTime=false) const |
int | GetMinute (bool localTime=false) const |
int | GetSecond (bool localTime=false) const |
bool | IsDST (bool localTime=false) const |
Static Public Member Functions | |
static DateTime | Now () |
static int64_t | CurrentTimeMillis () |
static Aws::String | CalculateLocalTimestampAsString (const char *formatStr) |
static Aws::String | CalculateGmtTimestampAsString (const char *formatStr) |
static int | CalculateCurrentHour () |
static double | ComputeCurrentTimestampInAmazonFormat () |
Wrapper for all the weird crap we need to do with timestamps.
Definition at line 64 of file DateTime.h.
Aws::Utils::DateTime::DateTime | ( | ) |
Initializes time point to epoch
Aws::Utils::DateTime::DateTime | ( | const std::chrono::system_clock::time_point & | timepointToAssign | ) |
Initializes time point to any other arbirtrary timepoint
Aws::Utils::DateTime::DateTime | ( | int64_t | millisSinceEpoch | ) |
Initializes time point to millis Since epoch
Aws::Utils::DateTime::DateTime | ( | double | epoch_millis | ) |
Initializes time point to epoch time in seconds.millis
Aws::Utils::DateTime::DateTime | ( | const Aws::String & | timestamp, |
DateFormat | format | ||
) |
Initializes time point to value represented by timestamp and format.
Aws::Utils::DateTime::DateTime | ( | const char * | timestamp, |
DateFormat | format | ||
) |
Initializes time point to value represented by timestamp and format.
|
static |
Calculates the current hour of the day in localtime.
|
static |
Calculates the current gmt timestamp, formats it, and returns it as a string
|
static |
Calculates the current local timestamp, formats it and returns it as a string
|
static |
The amazon timestamp format is a double with seconds.milliseconds
|
static |
Get the millis since epoch representing this very instant.
int Aws::Utils::DateTime::GetDay | ( | bool | localTime = false | ) | const |
Get the Day of the Month portion of this dateTime. localTime if true, return local time, otherwise return UTC
DayOfWeek Aws::Utils::DateTime::GetDayOfWeek | ( | bool | localTime = false | ) | const |
Get the Day of the Week portion of this dateTime. localTime if true, return local time, otherwise return UTC
int Aws::Utils::DateTime::GetHour | ( | bool | localTime = false | ) | const |
Get the Hour portion of this dateTime. localTime if true, return local time, otherwise return UTC
int Aws::Utils::DateTime::GetMinute | ( | bool | localTime = false | ) | const |
Get the Minute portion of this dateTime. localTime if true, return local time, otherwise return UTC
Month Aws::Utils::DateTime::GetMonth | ( | bool | localTime = false | ) | const |
Get the Month portion of this dateTime. localTime if true, return local time, otherwise return UTC
int Aws::Utils::DateTime::GetSecond | ( | bool | localTime = false | ) | const |
Get the Second portion of this dateTime. localTime if true, return local time, otherwise return UTC
int Aws::Utils::DateTime::GetYear | ( | bool | localTime = false | ) | const |
Get the Year portion of this dateTime. localTime if true, return local time, otherwise return UTC
bool Aws::Utils::DateTime::IsDST | ( | bool | localTime = false | ) | const |
Get whether or not this dateTime is in Daylight savings time. localTime if true, return local time, otherwise return UTC
int64_t Aws::Utils::DateTime::Millis | ( | ) | const |
Milliseconds since epoch of this datetime.
|
static |
Get an instance of DateTime representing this very instant.
bool Aws::Utils::DateTime::operator!= | ( | const DateTime & | other | ) | const |
bool Aws::Utils::DateTime::operator< | ( | const DateTime & | other | ) | const |
bool Aws::Utils::DateTime::operator<= | ( | const DateTime & | other | ) | const |
DateTime& Aws::Utils::DateTime::operator= | ( | double | secondsSinceEpoch | ) |
Assign from seconds.millis since epoch.
DateTime& Aws::Utils::DateTime::operator= | ( | int64_t | millisSinceEpoch | ) |
Assign from millis since epoch.
DateTime& Aws::Utils::DateTime::operator= | ( | const std::chrono::system_clock::time_point & | timepointToAssign | ) |
Assign from another time_point
bool Aws::Utils::DateTime::operator== | ( | const DateTime & | other | ) | const |
bool Aws::Utils::DateTime::operator> | ( | const DateTime & | other | ) | const |
bool Aws::Utils::DateTime::operator>= | ( | const DateTime & | other | ) | const |
double Aws::Utils::DateTime::SecondsWithMSPrecision | ( | ) | const |
Get the representation of this datetime as seconds.milliseconds since epoch
Aws::String Aws::Utils::DateTime::ToGmtString | ( | DateFormat | format | ) | const |
Convert dateTime to GMT time string using predefined format.
Aws::String Aws::Utils::DateTime::ToGmtString | ( | const char * | formatStr | ) | const |
Convert dateTime to GMT time string using arbitrary format.
Aws::String Aws::Utils::DateTime::ToLocalTimeString | ( | DateFormat | format | ) | const |
Convert dateTime to local time string using predefined format.
Aws::String Aws::Utils::DateTime::ToLocalTimeString | ( | const char * | formatStr | ) | const |
Convert dateTime to local time string using arbitrary format.
std::chrono::system_clock::time_point Aws::Utils::DateTime::UnderlyingTimestamp | ( | ) | const |
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.
|
inline |
Whether or not parsing the timestamp from string was successful.
Definition at line 122 of file DateTime.h.