From a475172d8c2140f5790ed8595940bacf3df1cd97 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 20 Jan 2025 11:38:22 -0800 Subject: [PATCH] Bug 798946 - start/end of current/last quarter have off-by-one error --- libgnucash/engine/gnc-option-date.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgnucash/engine/gnc-option-date.cpp b/libgnucash/engine/gnc-option-date.cpp index ee3c72b0d7..fdf954f9a6 100644 --- a/libgnucash/engine/gnc-option-date.cpp +++ b/libgnucash/engine/gnc-option-date.cpp @@ -527,7 +527,7 @@ gnc_relative_date_to_time64(RelativeDatePeriod period) { auto delta = (now.tm_mon >= acct_per.tm_mon ? ( now.tm_mon - acct_per.tm_mon) % 3 : - 3 - ((acct_per.tm_mon - now.tm_mon) % 3)); + (3 - acct_per.tm_mon - now.tm_mon) % 3); now.tm_mon = now.tm_mon - delta; } [[fallthrough]];