diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/MRA/src/MraOfflineMsg.cpp | 15 |
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)
|