Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cTimeZone.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cTimeZone_H
7 #define _INC_cTimeZone_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "cTimeUnits.h"
13 #include "cUnitTestDecl.h"
14 #include "StrConst.h"
15 
16 namespace Gray
17 {
19  {
26  };
27 
28  struct cTimeZone
29  {
33 
36 
39  };
40 
41  class GRAYCORE_LINK cTimeZoneMgr // : public cSingleton<cTimeZoneMgr>
42  {
46 
47  private:
48  static bool sm_bInitTimeZoneSet;
49 
50  public:
51  static const cTimeZone k_TimeZones[];
52 
53  public:
54  static TZ_TYPE GRAYCALL GetLocalTimeZoneOffset();
55 
56  static const cTimeZone* GRAYCALL FindTimeZone(TZ_TYPE nTimeZoneOffset);
57  static const cTimeZone* GRAYCALL FindTimeZone(const GChar_t* pszName);
58  static const cTimeZone* GRAYCALL FindTimeZoneHead(const GChar_t* pszName);
59 
61  };
62 }
63 
64 #endif
#define GRAYCORE_LINK
Definition: GrayCore.h:47
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define UNITTEST_FRIEND(n)
Define this in the class body to be unit tested. Allow the unit test to access private/protected stuf...
Definition: cUnitTestDecl.h:17
Definition: cTimeZone.h:42
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
TZ_TYPE
Definition: cTimeUnits.h:29
TZ_DSTRULE_TYPE
Definition: cTimeZone.h:19
@ 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
char GChar_t
My version of TCHAR, _TCHAR.
Definition: StrConst.h:26
Definition: cTimeZone.h:29
const GChar_t * m_pszTimeZoneDesc
Long name and description.
Definition: cTimeZone.h:35
TZ_TYPE m_nTimeZoneOffset
offset from UTC/GMT in minutes. Pure geography, NOT DST.
Definition: cTimeZone.h:37
TZ_DSTRULE_TYPE m_eDSTRule
does it have/use a DST calculation? needs cTimeUnits.
Definition: cTimeZone.h:38
const GChar_t * m_pszTimeZoneName
Short Name. EST, PST, etc.
Definition: cTimeZone.h:34