#include <TimeZone.hpp>
Collaboration diagram for Ionflux::Tools::TimeZone:
Public Member Functions | |
TimeZone () | |
Constructor. | |
TimeZone (int initOffset) | |
Constructor. | |
TimeZone (int initOffset, const std::string &initNameNormal, const std::string &initNameDST, const std::string &initShortNameNormal, const std::string &initShortNameDST, const std::string &initAliases) | |
Constructor. | |
TimeZone (int initOffset, const DSTSwitchingRule &initToDST, const DSTSwitchingRule &initToNormal) | |
Constructor. | |
TimeZone (int initOffset, const DSTSwitchingRule &initToDST, const DSTSwitchingRule &initToNormal, const std::string &initNameNormal, const std::string &initNameDST, const std::string &initShortNameNormal, const std::string &initShortNameDST, const std::string &initAliases) | |
Constructor. | |
virtual | ~TimeZone () |
Destructor. | |
virtual void | setOffset (int newOffset) |
Set UTC offset. | |
virtual void | setNameNormal (const std::string &newNameNormal) |
Set time zone name (normal time). | |
virtual void | setNameDST (const std::string &newNameDST) |
Set time zone name (DST). | |
virtual void | setShortNameNormal (const std::string &newNameNormal) |
Set time zone name (normal time). | |
virtual void | setShortNameDST (const std::string &newNameDST) |
Set time zone name (DST). | |
virtual void | setAliases (const std::string &newAliases) |
Set time zone alias names. | |
virtual void | setDSTRules (const DSTSwitchingRule &newToDST, const DSTSwitchingRule &newToNormal) |
Set DST switching rules. | |
virtual bool | isDST (const DateTime &utcDT) const |
Get current DST state (UTC). | |
virtual bool | localIsDST (const DateTime &localDT) const |
Get current DST state (local time). | |
virtual int | getCurrentOffset (const DateTime &utcDT) const |
Get current UTC offset. | |
virtual const DSTSwitchingRule * | getDSTRule (bool ruleFlag) const |
Get DST rule. | |
DateTime | getSwitchDT (Year year, const DSTSwitchingRule &rule) const |
Get switch date. | |
virtual int | getOffset () const |
Get UTC offset. | |
virtual std::string | getNameNormal () const |
Get time zone name (normal time). | |
virtual std::string | getNameDST () const |
Get time zone name (DST). | |
virtual std::string | getShortNameNormal () const |
Get time zone name (normal time). | |
virtual std::string | getShortNameDST () const |
Get time zone name (DST). | |
virtual std::string | getAliases () const |
Get time zone alias names. | |
virtual bool | hasAlias (const std::string &checkAlias) const |
Check alias name. | |
virtual void | enableDST (bool enableFlag) |
Enable or disable DST. | |
Static Public Attributes | |
static const DSTSwitchingRule | DSR_TO_DST_EUROPE_WESTERN |
DST switching rule: Europe/Western (to DST). | |
static const DSTSwitchingRule | DSR_TO_NORMAL_EUROPE_WESTERN |
DST switching rule: Europe/Western (to normal). | |
static const DSTSwitchingRule | DSR_TO_DST_EUROPE_CENTRAL |
DST switching rule: Europe/Central (to DST). | |
static const DSTSwitchingRule | DSR_TO_NORMAL_EUROPE_CENTRAL |
DST switching rule: Europe/Central (to normal). | |
static const DSTSwitchingRule | DSR_TO_DST_EUROPE_EASTERN |
DST switching rule: Europe/Eastern (to DST). | |
static const DSTSwitchingRule | DSR_TO_NORMAL_EUROPE_EASTERN |
DST switching rule: Europe/Eastern (to normal). | |
static const DSTSwitchingRule | DSR_TO_DST_USA |
DST switching rule: USA (to DST). | |
static const DSTSwitchingRule | DSR_TO_NORMAL_USA |
DST switching rule: USA (to normal). | |
static const DSTSwitchingRule | DSR_TO_DST_EGYPT |
DST switching rule: Egypt (to DST). | |
static const DSTSwitchingRule | DSR_TO_NORMAL_EGYPT |
DST switching rule: Egypt (to normal). | |
Protected Attributes | |
int | offset |
UTC offset (minutes). | |
bool | useDST |
DST flag (true if DST rules are defined). | |
DSTSwitchingRule | toDST |
Rule for switching to DST. | |
DSTSwitchingRule | toNormal |
Rule for switching to normal time. | |
std::string | nameNormal |
Name of the time zone (normal time). | |
std::string | nameDST |
Name of the time zone (DST). | |
std::string | shortNameNormal |
Short name of the time zone (normal time). | |
std::string | shortNameDST |
Short name of the time zone (DST). | |
std::string | aliases |
Alias names for the time zone. |
Provides information required for the time zone transformation of datetimes, such as UTC offset and DST switching rules.
|
Constructor. Construct new TimeZone object. |
|
Constructor. Construct new TimeZone object.
|
|
Constructor. Construct new TimeZone object.
|
|
Constructor. Construct new TimeZone object.
|
|
Constructor. Construct new TimeZone object.
|
|
Destructor. Destruct TimeZone object. |
|
Enable or disable DST.
Sets whether to apply daylight saving time switching rules. Passing
|
|
Get time zone alias names.
|
|
Get current UTC offset. Get the UTC offset, in minutes, corrected for DST, for the local time corresponding to the specified UTC DateTime.
|
|
Get DST rule.
Return one of the DST rules for this time zone.
|
|
Get time zone name (DST).
|
|
Get time zone name (normal time).
|
|
Get UTC offset.
|
|
Get time zone name (DST).
|
|
Get time zone name (normal time).
|
|
Get switch date. Creates an exact switch date (UTC) from a DST switching rule for the specified year.
|
|
Check alias name. Checks whether this time zone has a specified alias name.
|
|
Get current DST state (UTC). Get current DST state of an UTC datetime in the local time zone.
|
|
Get current DST state (local time). Get current DST state of a local time.
|
|
Set time zone alias names. Set alias names for this time zone. This is a colon (':') separated list of names that may be used to refer to this time zone.
|
|
Set DST switching rules. Sets the daylight saving time switching rules.
|
|
Set time zone name (DST). Set a name for this time zone during DST (e.g. "Central European Summer Time").
|
|
Set time zone name (normal time). Set a name for this time zone during normal time (e.g. "Central European Time").
|
|
Set UTC offset. Sets the UTC offset of the time zone (normal time).
|
|
Set time zone name (DST). Set a name for this time zone during DST (e.g. "CEST").
|
|
Set time zone name (normal time). Set a short name for this time zone during normal time (e.g. "CET").
|
|
Alias names for the time zone.
|
|
Initial value: { DSTSwitchingRule::DSR_TYPE_TO_DST, 4, 5, 5, 0, 0, 0}
|
|
Initial value: { DSTSwitchingRule::DSR_TYPE_TO_DST, 3, 0, 5, 2, 0, 0}
|
|
Initial value: { DSTSwitchingRule::DSR_TYPE_TO_DST, 3, 0, 5, 3, 0, 0}
|
|
Initial value: { DSTSwitchingRule::DSR_TYPE_TO_DST, 3, 0, 5, 1, 0, 0}
|
|
Initial value: { DSTSwitchingRule::DSR_TYPE_TO_DST, 4, 0, 1, 2, 0, 0}
|
|
Initial value: { DSTSwitchingRule::DSR_TYPE_TO_NORMAL, 10, 5, 1, 0, 0, 0}
|
|
Initial value: { DSTSwitchingRule::DSR_TYPE_TO_NORMAL, 10, 0, 5, 3, 0, 0}
|
|
Initial value: { DSTSwitchingRule::DSR_TYPE_TO_NORMAL, 10, 0, 5, 4, 0, 0}
|
|
Initial value: { DSTSwitchingRule::DSR_TYPE_TO_NORMAL, 10, 0, 5, 2, 0, 0}
|
|
Initial value: { DSTSwitchingRule::DSR_TYPE_TO_NORMAL, 10, 0, 5, 2, 0, 0}
|
|
Name of the time zone (DST).
|
|
Name of the time zone (normal time).
|
|
UTC offset (minutes).
|
|
Short name of the time zone (DST).
|
|
Short name of the time zone (normal time).
|
|
Rule for switching to DST.
|
|
Rule for switching to normal time.
|
|
DST flag (true if DST rules are defined).
|