From d513db102812c5dd83f94084e979bb7e24345498 Mon Sep 17 00:00:00 2001 From: sje Date: Wed, 1 Nov 2006 14:57:42 +0000 Subject: git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@24 4f64403b-2f21-0410-a795-97e2b3489a10 --- worldtime_protocol/timezone.h | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 worldtime_protocol/timezone.h (limited to 'worldtime_protocol/timezone.h') diff --git a/worldtime_protocol/timezone.h b/worldtime_protocol/timezone.h new file mode 100644 index 0000000..ddb9a52 --- /dev/null +++ b/worldtime_protocol/timezone.h @@ -0,0 +1,44 @@ +#ifndef _TIMEZONE_H +#define _TIMEZONE_H + +#define TZREG "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones" +#define TZREG_9X "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Time Zones" +//#define TZREG2 "SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation" +#define MAX_SIZE 512 + +#include +#include + +struct REG_TZI { + DWORD Bias; + DWORD StandardBias; + DWORD DaylightBias; + SYSTEMTIME StandardDate; + SYSTEMTIME DaylightDate; +}; + + +struct LS_TZREG { + TCHAR tcName[MAX_SIZE]; + TCHAR tcDisp[MAX_SIZE]; + TCHAR tcDLT[MAX_SIZE]; + TCHAR tcSTD[MAX_SIZE]; + TCHAR MapID[MAX_SIZE]; + DWORD Index; + DWORD ActiveTimeBias; + //TIME_ZONE_INFORMATION TZI; + REG_TZI TZI; + + unsigned int list_index; + + bool operator<(const LS_TZREG &other); +}; + +typedef std::vector< LS_TZREG > TimeList; + +extern TimeList timezone_list, geo_timezone_list; +bool build_timezone_list(); + +void convert_regdata_to_tzi(int vector_index); + +#endif -- cgit v1.2.3