From e2d93196c51aa1e8ba2049b937a01fac32e8f568 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 18 Aug 2018 11:15:56 +0300 Subject: ISO time format to use UTC time, according to ISO8601 --- plugins/Import/src/textjson.cpp | 2 +- plugins/Msg_Export/src/utils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp index a0e168593b..0b7a0616a3 100644 --- a/plugins/Import/src/textjson.cpp +++ b/plugins/Import/src/textjson.cpp @@ -118,7 +118,7 @@ public: if (res == 6) { st.tm_mon--; st.tm_year -= 1900; - time_t tm = mktime(&st); + time_t tm = _mkgmtime(&st); if (tm != -1) dbei->timestamp = tm; } diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index 081ad6e86a..01b9639e10 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -812,7 +812,7 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, wstring sFilePath JSONNode pRoot; pRoot.push_back(JSONNode("type", dbei.eventType)); - TimeZone_PrintTimeStamp(0, dbei.timestamp, L"I", szTemp, _countof(szTemp), 0); + TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, dbei.timestamp, L"I", szTemp, _countof(szTemp), 0); pRoot.push_back(JSONNode("isotime", T2Utf(szTemp).get())); std::string flags; -- cgit v1.2.3