RFC: Timestamps/timezones proposal
Christian Stimming
stimming at tuhh.de
Thu Jul 17 04:37:09 EDT 2008
Am Mittwoch, 16. Juli 2008 22:04 schrieb Charles Day:
> OK, here's an idea. I'm interested in seeing the reaction. Maybe it's
> stupid, maybe not.
>
> 1. Store transaction timestamps in UTC.
Transactions currently store two timestamps, see
http://svn.gnucash.org/docs/HEAD/structtransaction__s.html
Timespec date_entered; /* date register entry was made */
Timespec date_posted; /* date transaction was posted at bank */
I assume we're discussion the date_posted here. For the reasons that have been
discussed in the "Re: time_t" thread in length, I don't think storing this in
UTC really solves the problem at hand. Instead, I propose a different
approach:
Change the date_entered field of a transaction into a GDate.
> 2. Set a timezone for each account.
I think the case of different account timezones inside the same gnc_book is an
extreme corner case. Wait a second - that's the European point of view. Is
this different in North America? From a European point of view, I think the
UI necessary to handle one timezone per account is an insane overkill that no
one will understand at all. Instead, if at all, a book should store one
timezone and that's it.
> 3. In account registers, the transaction date is displayed according to
> that account's timezone.
If date_posted were a GDate, the transaction date is simply that date.
> 4. In account registers, entering/altering a transaction date is always
> done in terms of that account's timezone.
Yes.
> 5. Add report options allowing the user to pick a reporting time and
> timezone
I don't think this could be presented in a UI that isn't grossly
misunderstandable to the vast majority of users (though again, that's the
point of view of contries which don't have more than one timezone). Instead I
would simply choose the local timezone for each report, as it is currently.
> 6. Allow users to specify the time of day for transactions. (Perhaps
> optional.)
No, even though this is being asked for in that very old bug, I don't think
this will improve the situation, let alone the UI.
> For example, as I move
> around the globe, altering my computer's timezone wouldn't affect how
> transactions are displayed
This, as everyone confirmed so far, is still clearly a bug and needs to be
fixed in any case.
Regards,
Christian
More information about the gnucash-devel
mailing list