#include <FXTime.h>
Given that there are 1,000,000 microseconds in a second and roughly 365.24119241192411924119241192412 days in a year, there are roughly 31,556,839,024,390 microseconds in a year. This means that an unsigned 64 bit container can hold the latest date of 20th February, year 584,556 which is probably enough.
FXTime knows when it is in local time and correctly serialises itself such that timezone translation correctly occurs.
Definition at line 47 of file FXTime.h.
Public Member Functions | |
FXTime (FXulong _value=0, bool _isLocalTime=false) | |
FXTime (time_t ctime) | |
FXTime (int ctime) | |
FXTime & | operator= (FXulong _value) |
FXTime & | operator= (time_t ctime) |
FXTime & | operator= (int ctime) |
bool | operator! () const throw () |
bool | operator== (const FXTime &o) const throw () |
bool | operator!= (const FXTime &o) const throw () |
bool | operator< (const FXTime &o) const throw () |
bool | operator> (const FXTime &o) const throw () |
FXTime & | operator+= (const FXTime &b) throw () |
FXTime & | operator+= (FXulong v) throw () |
FXTime & | operator-= (const FXTime &b) throw () |
FXTime & | operator-= (FXulong v) throw () |
time_t | as_time_t () const throw () |
FXTime & | set_time_t (time_t v) throw () |
tm * | as_tm (struct tm *buf, bool inLocalTime=false) const |
FXTime & | set_tm (struct tm *buf, bool isInLocalTime=false) |
FXString | asString (const FXString &fmt="%Y/%m/%d %H:%M:%S.%F %Z") const |
FXTime & | toLocalTime () |
FXTime & | toUTC () |
Static Public Member Functions | |
static FXTime | now (bool inLocalTime=false) |
static FXlong | localTimeDiff () |
Public Attributes | |
bool | isLocalTime |
FXulong | value |
Static Public Attributes | |
static const FXulong | micsPerSecond |
static const FXulong | micsPerMinute |
static const FXulong | micsPerHour |
static const FXulong | micsPerDay |
static const FXulong | micsPerYear |
static const FXulong | mics1stJan1601 |
static const FXulong | mics1stJan1970 |
Friends | |
FXTime | operator+ (const FXTime &a, const FXTime &b) throw () |
FXTime | operator+ (const FXTime &a, FXulong v) throw () |
FXTime | operator- (const FXTime &a, const FXTime &b) throw () |
FXTime | operator- (const FXTime &a, FXulong v) throw () |
FXAPI FXStream & | operator<< (FXStream &s, const FXTime &i) |
FXAPI FXStream & | operator>> (FXStream &s, FXTime &i) |