From 3219a135c7a806551800caf299e4f3732f000183 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 31 Jan 2014 18:57:41 +0000 Subject: 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 --- protocols/MRA/src/MraOfflineMsg.cpp | 15 +++++---------- 1 file 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) -- cgit v1.2.3