[GNC-dev] Bug 796725

Robert Fewell 14ubobit at gmail.com
Tue Aug 14 09:55:01 EDT 2018


I have been looking at this one and know what is wrong but not sure if my
fix is valid.

It is to do with searching for transactions by posted date and returning
the wrong number of transactions for the required filter option.

When the date entered in the GtkEntry, gnc_date_edit_get_date returns the
time64 but at 12:00:00 am for that day.

Looking at the transaction posted date in my Xml file they are at
'2018-01-01 10:59:00 +0000'

I can fix this in search-date.c by changing the two occurrences of
gnc_date_edit_get_date to some thing like this...

        time64 temp = gnc_date_edit_get_date (GNC_DATE_EDIT (priv->entry));
        struct tm * temp_tm = gnc_localtime (&temp);

        fi->tt = gnc_dmy2time64_neutral (temp_tm->tm_mday, temp_tm->tm_mon
+ 1, temp_tm->tm_year + 1900);
        gnc_tm_free (temp_tm);

but this would affect all date searches in transactions, invoices and bills.

Should all dates be at this neutral time so it does not matter ?

Regards,

Bob


More information about the gnucash-devel mailing list