Skip to content

Commit 6712a4a

Browse files
committed
gnc_relative_date_to_time64: Have only if statemen for period TODAY.
1 parent ad92ae4 commit 6712a4a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libgnucash/engine/gnc-option-date.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,12 @@ time64
519519
gnc_relative_date_to_time64(RelativeDatePeriod period, time64 now_t)
520520
{
521521
if (period == RelativeDatePeriod::TODAY)
522-
return static_cast<time64>(GncDateTime());
522+
return now_t;
523523
if (period == RelativeDatePeriod::START_ACCOUNTING_PERIOD)
524524
return gnc_accounting_period_fiscal_start();
525525
if (period == RelativeDatePeriod::END_ACCOUNTING_PERIOD)
526526
return gnc_accounting_period_fiscal_end();
527527

528-
if (period == RelativeDatePeriod::TODAY)
529-
return now_t;
530528
auto now{static_cast<tm>(GncDateTime(now_t))};
531529
struct tm acct_per =
532530
static_cast<tm>(GncDateTime(gnc_accounting_period_fiscal_start()));

0 commit comments

Comments
 (0)