r23044 - gnucash/trunk/src/engine - Introduce transaction setter xaccTransSetDatePostedSecsNormalized() that ignores the time-of-day part.

Derek Atkins warlord at MIT.EDU
Mon Jun 10 18:02:46 EDT 2013


Christian Stimming <cstim at code.gnucash.org> writes:

> Author: cstim
> Date: 2013-06-09 17:32:06 -0400 (Sun, 09 Jun 2013)
> New Revision: 23044
> Trac: http://svn.gnucash.org/trac/changeset/23044
>
> Modified:
>    gnucash/trunk/src/engine/Transaction.c
>    gnucash/trunk/src/engine/Transaction.h
> Log:
> Introduce transaction setter xaccTransSetDatePostedSecsNormalized() that ignores the time-of-day part.
>
> We've struggled with the time-of-day part of the PostedDate for long
> enough. The PostedDate field is just not meaningful with anything else
> but a plain date, and no time-of-day at all. Hence, the correct setter
> function for this particular field must ignore the time-of-day. Consequently,
> a GDate should be used here anyway, but in many places the time64 is more
> convenient. The new function will now redirect that time64 to the GDate
> setter function to make sure we will now map everything to one single date.

I'll note that the Close Book transactions depend on being able to say
+1second to the "canonical" date/time..

-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
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list