summaryrefslogtreecommitdiff
path: root/plugins/HistoryPlusPlus/hpp_global.pas
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-01-27 16:42:04 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-01-27 16:42:04 +0300
commitd29abce19b35fc0b0c71eaaf2c294b153e309ae9 (patch)
tree4bd36c5dcdd4733996ffb1cdca530673584042f8 /plugins/HistoryPlusPlus/hpp_global.pas
parent184833fc4932e3bb21e5794429a617cc9cca40d7 (diff)
fixes #4834 (History++: Incorrect timestamps in history after switching to new timestamp format)
Diffstat (limited to 'plugins/HistoryPlusPlus/hpp_global.pas')
-rw-r--r--plugins/HistoryPlusPlus/hpp_global.pas11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/HistoryPlusPlus/hpp_global.pas b/plugins/HistoryPlusPlus/hpp_global.pas
index 6af8367813..018e233b3f 100644
--- a/plugins/HistoryPlusPlus/hpp_global.pas
+++ b/plugins/HistoryPlusPlus/hpp_global.pas
@@ -293,6 +293,8 @@ procedure OpenUrl(const URLText: String; NewWindow: Boolean);
function HppMessageBox(Handle: THandle; const Text: String; const Caption: String; Flags: Integer): Integer;
+function my_event_get(hDbEvent:TMEVENT; dbei:PDBEVENTINFO):int;
+
function MakeTextXMLedA(const Text: AnsiString): AnsiString;
function MakeTextXMLedW(const Text: WideString): WideString;
function FormatCString(const Text: WideString): WideString;
@@ -708,6 +710,15 @@ begin
or (Pos(RTF_BEGIN_2, Value) = 1);
end;
+function my_event_get(hDbEvent:TMEVENT; dbei:PDBEVENTINFO):int;
+begin
+ Result := db_event_get(hDbEvent, dbei);
+ if Result = 0 then begin
+ if (dbei.flags and DBEF_MSEC) <> 0 then
+ dbei.Timestamp := Trunc(dbei.Timestamp / 1000);
+ end;
+end;
+
function _WideCharType(WC: WideChar; dwInfoType: Cardinal): Word;
begin
Win32Check(GetStringTypeExW(GetThreadLocale, dwInfoType, PWideChar(@WC), 1, Result))