#include <MamaTimeZone.h>
Name | |
---|---|
const MamaTimeZone &static const MamaTimeZone & | utc() |
const MamaTimeZone & | usEastern() |
void | setScanningInterval(mama_f64_t seconds) |
MamaTimeZone() | |
MamaTimeZone(const char * tz) | |
MamaTimeZone(const MamaTimeZone & copy) | |
~MamaTimeZone() | |
MamaTimeZone & | operator=(const MamaTimeZone & rhs) |
void | set(const char * tz) |
void | clear() |
const char * | tz() const |
mama_i32_t | offset() const |
void | check() |
mamaTimeZone | getCValue() |
const mamaTimeZone | getCValue() const |
class Wombat::MamaTimeZone;
A time zone representation to make conversion of timestamps to and from particular time zones more convenient.
Note: The addition of instance monitoring to the MamaTimeZone implementation has resulted in the following limitation in its usage. Do not create short lived objects of this type on the method stack or delete long lived objects before program termination. Pointers to all instances are maintained in a global vector. At the moment there is no mechanism by which we can detect deleted objects or those which are popped off the method stack. An internal thread will always iterate over all objects ever created. A call to an object removed from the stack will result in nondeterminable behaviour. Pointers could be stored in a map against a unique object id; however, addition and removal from the map would have to be synchronized which would impact on performance.
static const MamaTimeZone &static const MamaTimeZone & utc()
Return a reference to a MamaTimeZone corresponding to the local time zone. Return a reference to a MamaTimeZone corresponding to UTC time zone.
static const MamaTimeZone & usEastern()
Return a reference to a MamaTimeZone corresponding to the US Eastern time zone.
static void setScanningInterval(
mama_f64_t seconds
)
Use to set the interval of the thread updating each MamaTimeZone instance offset
MamaTimeZone()
Constructor.
MamaTimeZone(
const char * tz
)
Constructor. NULL argument is equivalent to local timezone.
MamaTimeZone(
const MamaTimeZone & copy
)
Copy constructor.
~MamaTimeZone()
Destructor.
MamaTimeZone & operator=(
const MamaTimeZone & rhs
)
Assignment operator.
void set(
const char * tz
)
Assign new timezones to this object.
void clear()
Clear this object.
const char * tz() const
Return the time zone string.
mama_i32_t offset() const
Return the offset from UTC (in seconds). Can be positive or negative, depending upon the direction.
void check()
Check (recalculate) the UTC offset in case it has changed due to daylight savings adjustments.
inline mamaTimeZone getCValue()
inline const mamaTimeZone getCValue() const
Updated on 2023-03-31 at 15:29:26 +0100