libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gbl::DateTime Struct Reference
Inheritance diagram for gbl::DateTime:
GblDateTime

Public Member Functions

std::time_t toUnix () const
 
TimeSpec toSpecUtc () const
 
void toLocal (std::tm *pBrokenDown) const
 
void toUtc (std::tm *pBrokenDown) const
 
std::string toIso8601 (void) const
 
std::string format (const char *pFmt) const
 
bool normalize ()
 
void set (Year year, Month month=Month::January, Day day=1, Hour hours=0, Minute mins=0, Second secs=0, NanoSecond ns=0, Second tzOff=0)
 
void setDate (const Date &other)
 
void setTime (const Time &other)
 
bool isValid () const
 
bool isUtc () const
 
bool isLocal () const
 

Static Public Member Functions

static DateTime fromUnix (std::time_t epoch)
 
static DateTime fromSpecUtc (TimeSpec spec)
 
static DateTime fromLocal (const std::tm &local)
 
static DateTime fromUtc (const std::tm &utc)
 
static DateTime nowLocal ()
 
static DateTime nowUtc ()
 
static DateTime parse (const char *pString, const char *pFormat)
 

Additional Inherited Members

- Data Fields inherited from GblDateTime
GblDate date
 
GblTime time
 
int16_t utcOffset
 

Detailed Description

Definition at line 80 of file gimbal_date_time.hpp.


The documentation for this struct was generated from the following file: