diff --git a/libgnucash/engine/gnc-option-date.cpp b/libgnucash/engine/gnc-option-date.cpp index d5c0e104c0..3b47c7d5a1 100644 --- a/libgnucash/engine/gnc-option-date.cpp +++ b/libgnucash/engine/gnc-option-date.cpp @@ -519,14 +519,12 @@ time64 gnc_relative_date_to_time64(RelativeDatePeriod period, time64 now_t) { if (period == RelativeDatePeriod::TODAY) - return static_cast(GncDateTime()); + return now_t; if (period == RelativeDatePeriod::START_ACCOUNTING_PERIOD) return gnc_accounting_period_fiscal_start(); if (period == RelativeDatePeriod::END_ACCOUNTING_PERIOD) return gnc_accounting_period_fiscal_end(); - if (period == RelativeDatePeriod::TODAY) - return now_t; auto now{static_cast(GncDateTime(now_t))}; struct tm acct_per = static_cast(GncDateTime(gnc_accounting_period_fiscal_start()));