From d29abce19b35fc0b0c71eaaf2c294b153e309ae9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 27 Jan 2025 16:42:04 +0300 Subject: fixes #4834 (History++: Incorrect timestamps in history after switching to new timestamp format) --- plugins/HistoryPlusPlus/hpp_global.pas | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'plugins/HistoryPlusPlus/hpp_global.pas') 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)) -- cgit v1.2.3