summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Import/src/textjson.cpp17
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp4
2 files changed, 19 insertions, 2 deletions
diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp
index 1267148550..79ec9e6f99 100644
--- a/plugins/Import/src/textjson.cpp
+++ b/plugins/Import/src/textjson.cpp
@@ -111,7 +111,22 @@ public:
dbei->timestamp = tm;
}
}
-
+ else {
+ szTime = (*node)["isotime"].as_string();
+ if (!szTime.empty()) {
+ struct tm st = {};
+ int res = sscanf(szTime.c_str(), "%4d-%2d-%2dT%2d:%2d:%2dZ", &st.tm_year, &st.tm_mon, &st.tm_mday, &st.tm_hour, &st.tm_min, &st.tm_sec);
+ if (res == 6) {
+ st.tm_mon--;
+ st.tm_mday--;
+ st.tm_year -= 1900;
+ time_t tm = mktime(&st);
+ if (tm != -1)
+ dbei->timestamp = tm;
+ }
+ }
+ }
+
if (dbei->timestamp == 0)
dbei->timestamp = (*node)["timeStamp"].as_int();
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index ddafc4b599..081ad6e86a 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -811,7 +811,9 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, wstring sFilePath
if (g_bUseJson) {
JSONNode pRoot;
pRoot.push_back(JSONNode("type", dbei.eventType));
- pRoot.push_back(JSONNode("timeStamp", dbei.timestamp));
+
+ TimeZone_PrintTimeStamp(0, dbei.timestamp, L"I", szTemp, _countof(szTemp), 0);
+ pRoot.push_back(JSONNode("isotime", T2Utf(szTemp).get()));
std::string flags;
if (dbei.flags & DBEF_SENT)