Date or Date-and-time for transactions

Buddha Buck blaisepascal at
Fri Nov 30 10:38:57 EST 2012

On Fri, Nov 30, 2012 at 10:09 AM, Derek Atkins <warlord at> wrote:
>> Right. Since ISO8601 specifies that date-times are converted to UTC
>> (Z), we currently convert to-and-from the local TZ when we instantiate
>> objects with a Timespec field. I'm saying we should stop doing that
>> and just use UTC for timestamps. This has the added benefit of making
>> unnecessary the GTimeZone workarounds for MSWin, all of the messiness
>> associated with DST, and a boatload of code.
> Actually, the XML file stores times as local times.  Here's an example
> from my data file:
>   <trn:date-posted>
>     <ts:date>2007-01-01 00:00:00 -0500</ts:date>
>   </trn:date-posted>
>   <trn:date-entered>
>     <ts:date>2007-08-13 15:15:22 -0400</ts:date>
>   </trn:date-entered>

My understanding of ISO8601 suggests that this isn't even a valid
ISO8601 format;  I believe the entered date should be
"2007-08-13T15:15:22-0400" in valid ISO8601 format.

However, ISO8601 doesn't require the time portion, so if we are just
interested in the date-posted, it would make sense to store it as the
valid ISO8601 formatted "2007-01-01" and not worry about if it's noon
or midnight (or some other time).

More information about the gnucash-devel mailing list