Posting time bug fix proposal (simplified)

Charles Day cedayiv at gmail.com
Sat Aug 16 15:54:50 EDT 2008


On Sat, Aug 16, 2008 at 8:04 AM, Derek Atkins <warlord at mit.edu> wrote:

> "Charles Day" <cedayiv at gmail.com> 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.
>

Is there any way to tell which transactions were created by book closing? A
particular description, for example?

-Charles


More information about the gnucash-devel mailing list