Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cTimeZoneMgr Class Reference

#include <cTimeZone.h>

Static Public Member Functions

static TZ_TYPE __stdcall GetLocalTimeZoneOffset ()
 
static const cTimeZone *__stdcall FindTimeZone (TZ_TYPE nTimeZoneOffset)
 
static const cTimeZone *__stdcall FindTimeZone (const GChar_t *pszName)
 
static const cTimeZone *__stdcall FindTimeZoneHead (const GChar_t *pszName)
 

Static Public Attributes

static const cTimeZone k_TimeZones []
 Fixed/Default array of world time zones. terminated by name = nullptr;. More...
 

Friends

class cTimeZoneTests
 

Detailed Description

Manage the collection of time zones. We need to make this configurable since it may change over time.

Todo:
Manage dynamic list of TZ from file or db.

Member Function Documentation

◆ FindTimeZone() [1/2]

const cTimeZone *GRAYCALL Gray::cTimeZoneMgr::FindTimeZone ( const GChar_t pszName)
static

Get a block describing the time zone. (by name)

◆ FindTimeZone() [2/2]

const cTimeZone *GRAYCALL Gray::cTimeZoneMgr::FindTimeZone ( TZ_TYPE  nTimeZoneOffset)
static

Get a block describing the time zone. (by offset) geographic timezone does not include offset for DST.

◆ FindTimeZoneHead()

const cTimeZone *GRAYCALL Gray::cTimeZoneMgr::FindTimeZoneHead ( const GChar_t pszName)
static

◆ GetLocalTimeZoneOffset()

TZ_TYPE GRAYCALL Gray::cTimeZoneMgr::GetLocalTimeZoneOffset ( )
static

Get the time zone offset (for this local system) in minutes. The difference in minutes between UTC and local time This DOES NOT include DST offset if current.

Friends And Related Function Documentation

◆ cTimeZoneTests

friend class cTimeZoneTests
friend

Member Data Documentation

◆ k_TimeZones

const cTimeZone Gray::cTimeZoneMgr::k_TimeZones
static
Initial value:
=
{
{ _GT("Z"), _GT(""), TZ_UTC, TZ_DSTRULE_NONE },
{ _GT("G"), _GT(""), TZ_UTC, TZ_DSTRULE_NONE },
{ _GT("UTC"), _GT(""), TZ_UTC, TZ_DSTRULE_NONE },
{ _GT("GMT"), _GT(""), TZ_UTC, TZ_DSTRULE_NONE },
{ _GT("EST"), _GT("Eastern"), TZ_EST, TZ_DSTRULE_AMERICAN },
{ _GT("CST"), _GT("Central"), TZ_CST, TZ_DSTRULE_AMERICAN },
{ _GT("MST"), _GT("Mountain"), TZ_MST, TZ_DSTRULE_AMERICAN },
{ _GT("PST"), _GT("Pacific"), TZ_PST, TZ_DSTRULE_AMERICAN },
{ nullptr, nullptr, TZ_UTC, TZ_DSTRULE_NONE },
}
#define _GT(x)
like _T(x) macro for static text.
Definition: StrConst.h:27
@ TZ_EST
Eastern Standard Time Zone. LocalTime+offset=GMT, GMT-offset=Local (seconds)
Definition: cTimeUnits.h:39
@ TZ_PST
Pacific Standard Time Zone. Default for Windows.
Definition: cTimeUnits.h:42
@ TZ_MST
Definition: cTimeUnits.h:41
@ TZ_UTC
UTC = never use DST or any TZ offset.
Definition: cTimeUnits.h:35
@ TZ_CST
Definition: cTimeUnits.h:40
@ TZ_DSTRULE_AMERICAN
use the American rules for DST.
Definition: cTimeZone.h:25
@ TZ_DSTRULE_NONE
don't use DST at all. UTC.
Definition: cTimeZone.h:24

Fixed/Default array of world time zones. terminated by name = nullptr;.

terminated by name = nullptr;


The documentation for this class was generated from the following files: