diff options
author | George Hazan <george.hazan@gmail.com> | 2025-01-10 18:28:28 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-01-10 18:28:28 +0300 |
commit | 3d30ed65f9e226b7b183b23ce5dba435ec491f0b (patch) | |
tree | 512db95fca97a5b6f028ed4ca05f473cbd11190c /plugins/Import/src/textjson.cpp | |
parent | b58bd0a705dba9a32e4db1420e2d615c6ee6bd41 (diff) |
DBEVENTINFO::timestamp to become 64-bit integer
Diffstat (limited to 'plugins/Import/src/textjson.cpp')
-rw-r--r-- | plugins/Import/src/textjson.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Import/src/textjson.cpp b/plugins/Import/src/textjson.cpp index 3cfa254c8f..c78e031099 100644 --- a/plugins/Import/src/textjson.cpp +++ b/plugins/Import/src/textjson.cpp @@ -112,7 +112,7 @@ public: auto &node = *pNode;
dbei->eventType = node["type"].as_int();
- dbei->timestamp = 0;
+ dbei->iTimestamp = 0;
std::string szTime = node["time"].as_string();
if (!szTime.empty()) {
char c;
@@ -123,7 +123,7 @@ public: st.tm_year -= 1900;
time_t tm = mktime(&st);
if (tm != -1)
- dbei->timestamp = tm;
+ dbei->iTimestamp = tm;
}
}
else {
@@ -136,13 +136,13 @@ public: st.tm_year -= 1900;
time_t tm = _mkgmtime(&st);
if (tm != -1)
- dbei->timestamp = tm;
+ dbei->iTimestamp = tm;
}
}
}
- if (dbei->timestamp == 0)
- dbei->timestamp = node["timeStamp"].as_int();
+ if (dbei->iTimestamp == 0)
+ dbei->iTimestamp = node["timeStamp"].as_int();
dbei->flags = 0;
std::string szFlags = node["flags"].as_string();
@@ -343,16 +343,16 @@ public: if (mir_strcmp(dbei.szModule, szProto))
pRoot.push_back(JSONNode("module", dbei.szModule));
- pRoot.push_back(JSONNode("timestamp", dbei.timestamp));
+ pRoot.push_back(JSONNode("timestamp", dbei.getUnixtime()));
wchar_t szTemp[500];
- TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, dbei.timestamp, L"I", szTemp, _countof(szTemp), 0);
+ TimeZone_PrintTimeStamp(UTC_TIME_HANDLE, dbei.getUnixtime(), L"I", szTemp, _countof(szTemp), 0);
pRoot.push_back(JSONNode("isotime", T2Utf(szTemp).get()));
std::string flags;
- if (dbei.flags & DBEF_SENT)
+ if (dbei.bSent)
flags += "m";
- if (dbei.flags & DBEF_READ)
+ if (dbei.bRead)
flags += "r";
pRoot.push_back(JSONNode("flags", flags));
|