AW: AW: AW: Closing books: reference date

Jannick Asmus jannick.news at gmail.com
Tue Jan 12 10:23:05 EST 2010


Derek Atkins wrote:
> "Jannick Asmus" writes:
>
>> Mike Alexander wrote:
>>
>>> I think you're both right.  It's using the time posted as Derek
>>> says, but this transaction is excluded because it's posted time is
>>> after noon on December 31.  The code in dialog-close-book.c 
>>> adjusts
>>> the closing date to noon on the date given:
>>>
>>>    cbw->close_date =
>>> gnc_date_edit_get_date(GNC_DATE_EDIT(cbw->close_date_widget));
>>>    cbw->close_date += (3600 * 12);  /* Add 12 hours to the 
>>> timestamp
>>> */
>>>
>>> It would seem better to set it to the last second on that day by
>>> adding 3600*24-1.
>>
>> Thanks! Assuming this solution I hope that we are not running into 
>> the
>> time zone problem.
>
> Well, keep in mind that we're trying to make sure we get the 'right
> day'..  And I was also unaware that HBCI would get posted at a 
> 'time'
> different than manual entry..  *sigh*

I strongly believe that HBCI has to behave like this because it wants 
to seperate booking dates t_B and value dates t_V. They can have any 
order, i.e. any version of t_V=t_B, t_V > t_B and t_B < t_V is 
possible.

> And yes, we could also be hitting something of the time zone 
> problem --
> have you changed timezones?

No I haven't. The recent time zone problem was just hitting my mind 
when Mike wanted to normalize a time to midnight of some date. BTW: My 
time zone is Berlin.

>> Best wishes,
>> J.
>
> -derek

J. 




More information about the gnucash-devel mailing list