diff --git a/KeeAgent/KeeAgentExt.cs b/KeeAgent/KeeAgentExt.cs index af94e58..10577a1 100644 --- a/KeeAgent/KeeAgentExt.cs +++ b/KeeAgent/KeeAgentExt.cs @@ -908,6 +908,7 @@ private void MainForm_FileOpened(object sender, FileOpenedEventArgs e) return; } + var dtNow = DateTime.UtcNow; foreach (var entry in e.Database.RootGroup.GetEntries(true)) { if (e.Database.RecycleBinEnabled) { var recycleBin = e.Database.RootGroup.FindGroup(e.Database.RecycleBinUuid, true); @@ -916,7 +917,7 @@ private void MainForm_FileOpened(object sender, FileOpenedEventArgs e) } } - if (entry.Expires && entry.ExpiryTime <= DateTime.Now + if (entry.Expires && entry.ExpiryTime <= dtNow && !e.Database.GetKeeAgentSettings().AllowAutoLoadExpiredEntryKey) { continue; } diff --git a/KeeAgent/UI/EntryPickerDialog.cs b/KeeAgent/UI/EntryPickerDialog.cs index 1d10c78..14ce6ce 100644 --- a/KeeAgent/UI/EntryPickerDialog.cs +++ b/KeeAgent/UI/EntryPickerDialog.cs @@ -84,7 +84,7 @@ void InitalizeList(bool autodetect) { mCustomTreeViewEx.BeginUpdate(); mCustomTreeViewEx.Nodes.Clear(); - mCachedNow = DateTime.Now; + mCachedNow = DateTime.UtcNow; bool entriesFound = false; foreach (var db in ext.pluginHost.MainWindow.DocumentManager.GetOpenDatabases()) {