FX::FXTime Struct Reference

#include <FXTime.h>

List of all members.


Detailed Description

Holds the number of elapsed microseconds since 1st January year 0 UTC.

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)
FXTimeoperator= (FXulong _value)
FXTimeoperator= (time_t ctime)
FXTimeoperator= (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 ()
FXTimeoperator+= (const FXTime &b) throw ()
FXTimeoperator+= (FXulong v) throw ()
FXTimeoperator-= (const FXTime &b) throw ()
FXTimeoperator-= (FXulong v) throw ()
time_t as_time_t () const throw ()
FXTimeset_time_t (time_t v) throw ()
tm * as_tm (struct tm *buf, bool inLocalTime=false) const
FXTimeset_tm (struct tm *buf, bool isInLocalTime=false)
FXString asString (const FXString &fmt="%Y/%m/%d %H:%M:%S.%F %Z") const
FXTimetoLocalTime ()
FXTimetoUTC ()

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 FXStreamoperator<< (FXStream &s, const FXTime &i)
FXAPI FXStreamoperator>> (FXStream &s, FXTime &i)


The documentation for this struct was generated from the following file:
(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:37:05 2009 for TnFOX by doxygen v1.4.7