Op zaterdag 14 april 2018 19:01:09 CEST schreef Robert Fewell:
> Not sure about this but I have tracked this down as follows...
> 
> in dialog-invoice.c we start with this in the dialog
> 
> iw->opened_date = gnc_date_edit_new (gnc_time (NULL), FALSE, FALSE);
> 
> looking at the time64 number this starts of correct, i.e. today's value.
> 
> At some point this function gets called 'gnc_invoice_update_window' and on
> line 1766 we have
> 
> time = gncInvoiceGetDateOpened (invoice);
> 
> and time is 9223372036854775807 which is INT64_MAX which is what is
> returned for null invoice
> 
> following that we have...
> 
> if (!time)
> {
>         gnc_date_edit_set_time (GNC_DATE_EDIT (iw->opened_date),  gnc_time
> (NULL));
> }
> else
> {
>          gnc_date_edit_set_time (GNC_DATE_EDIT (iw->opened_date), time);
> }
> 
> So, should that be 'if(time == INT64_MAX)', is this the invalid date value
> now ?

Heh, I beat you to this... I have pushed this fix a few minutes ago.

> and I noticed when I searched for gnc_date_edit_new, some used
> gnc_time(NULL) while others used time(NULL)
> what's preferred, should they be changed ?
> 
I think gnc_time(NULL) is recommended to have a consistent date/time 
experience.

Geert


_______________________________________________
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to