summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-31 18:57:41 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-31 18:57:41 +0000
commit3219a135c7a806551800caf299e4f3732f000183 (patch)
treecf4c8304f5e0028190fc67f8fd8bc5faf94ec0b6 /protocols
parentb559e2ed5ee4937e57b1a293d021fc213c8baefe (diff)
fix for buggy time zone settings for MRA offline messages
git-svn-id: http://svn.miranda-ng.org/main/trunk@7976 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/MRA/src/MraOfflineMsg.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/protocols/MRA/src/MraOfflineMsg.cpp b/protocols/MRA/src/MraOfflineMsg.cpp
index dad1b3b693..72095a872f 100644
--- a/protocols/MRA/src/MraOfflineMsg.cpp
+++ b/protocols/MRA/src/MraOfflineMsg.cpp
@@ -10,18 +10,13 @@
static DWORD MraOfflineMessageConvertTime(INTERNET_TIME *pitTime)
{
SYSTEMTIME stTime, stUniversalTime;
- TIME_ZONE_INFORMATION tziTimeZoneMailRu = {0}, tziTimeZoneLocal;
-
- GetTimeZoneInformation(&tziTimeZoneLocal);
- if (GetTimeZoneInformation(&tziTimeZoneMailRu) == TIME_ZONE_ID_DAYLIGHT)
- tziTimeZoneMailRu.DaylightBias *= 2;
-
- tziTimeZoneMailRu.Bias = -MAILRU_SERVER_TIME_ZONE;
- tziTimeZoneMailRu.DaylightBias = -tziTimeZoneMailRu.DaylightBias;
+ TIME_ZONE_INFORMATION tziTimeZoneMailRu = {0};
+ tziTimeZoneMailRu.Bias = pitTime->lTimeZone/100*60;
+ tziTimeZoneMailRu.DaylightBias = pitTime->lTimeZone%100;
SystemTimeToTzSpecificLocalTime(&tziTimeZoneMailRu, &pitTime->stTime, &stUniversalTime);
- SystemTimeToTzSpecificLocalTime(&tziTimeZoneLocal, &stUniversalTime, &stTime);
+ SystemTimeToTzSpecificLocalTime(NULL, &stUniversalTime, &stTime);
- return((DWORD)MakeTime32FromLocalSystemTime(&stTime));
+ return (DWORD)MakeTime32FromLocalSystemTime(&stTime);
}
static DWORD MraOfflineMessageGetHeaderValueLow(LPSTR lpszHeaderLow, size_t dwHeaderSize, LPSTR lpszValueName, size_t dwValueNameSize, LPSTR *plpszValue, size_t *pdwValueSize)