diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-12-06 20:35:56 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-12-06 20:35:56 +0000 |
commit | 0b2253627c2043fe5a119ee43891246719a6e370 (patch) | |
tree | 620bf84988bee3b6b146ab867f81633f8ed06ab2 /src/modules/utils | |
parent | 3beb6aa384e631544a9dea831a7ed84df54e3ec1 (diff) |
added function getting timezone description
git-svn-id: http://svn.miranda-ng.org/main/trunk@2673 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/utils')
-rw-r--r-- | src/modules/utils/timezones.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp index dcdc68b32d..1f2a4f1306 100644 --- a/src/modules/utils/timezones.cpp +++ b/src/modules/utils/timezones.cpp @@ -129,6 +129,18 @@ static LPCTSTR timeapiGetTzName(HANDLE hTZ) return tz->tszName;
}
+static LPCTSTR timeapiGetTzDescription(LPCTSTR TZname)
+{
+ for (int i=0; i < g_timezonesBias.getCount(); i++)
+ {
+ MIM_TIMEZONE *tz = g_timezonesBias[i];
+
+ if (!lstrcmp(tz->tszName, TZname))
+ return tz->szDisplay;
+ }
+ return _T("");
+}
+
static void CalcTsOffset(MIM_TIMEZONE *tz)
{
SYSTEMTIME st, stl;
@@ -466,6 +478,7 @@ static INT_PTR GetTimeApi(WPARAM, LPARAM lParam) tmi->timeStampToTimeZoneTimeStamp = timeapiTimeStampToTimeZoneTimeStamp;
tmi->getTzi = timeapiGetTzi;
tmi->getTzName = timeapiGetTzName;
+ tmi->getTzDescription = timeapiGetTzDescription;
return TRUE;
}
|