"Charles Day" <[EMAIL PROTECTED]> writes:

>     How does this patch handle the (non-default) time used in the
>     book closing transactions?
>
> I was not aware of this issue. My patch doesn't change the backend's file
> writing code, so whatever timestamp is assigned by GnuCash is what gets saved.
> If the time written isn't midnight, the patch will think that the transaction
> is bug-affected when the file is read in again.
>
> Could you explain about the time used in book closing transactions? I had
> hoped to avoid changing the file writing part of the code, but maybe that's
> not possible.

See src/gnome-utils/dialog-date-close.c

First, there is an assumption that we're using a time_t:

  bal = xaccAccountGetBalanceAsOfDate(a, cacb->cbw->close_date+1);

However, the close_date is set 12 hours ahead of the default:

    cbw->close_date = gnc_date_edit_get_date(GNC_DATE_EDIT(cbw->close_date_widge
t));
    cbw->close_date += (3600 * 12);  /* Add 12 hours to the timestamp */

As the default is currently midnight this is generally always safe
in the current environment.

However, the closing transaction needs to be the "last" transaction
of the day.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [EMAIL PROTECTED]                        PGP key available
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to