Comment 56 for bug 365065

Revision history for this message
In , Christian Stimming (stimming-deactivatedaccount) wrote :

(In reply to comment #37)
> Writing it is enabled in
> https://github.com/Gnucash/gnucash/commit/0871866c3882b99cadadd63c71b8a23220060a64.

Yes, that's r19555 mentioned in comment #25.

No, unfortunately it's not "not really necessary" currently - there is one difference. The point of this extra field is that the date-and-time field is ambiguous with respect to what date the user entered during entering this transaction. It is ambiguous because depending on the time zone the user's computer was set during entering (or viewing) the date-and-time, it could be one date or the other. Only the GDate field solves this ambiguity by stating which date the user really entered.

> Since date_posted is always just a date, we can just
> stop using timespecs (which I intend to do anyway as part of converting from
> gdate to boost::calendar) and treat date_posted as a date instead of a time.

Yes, I'm all for this change. As stated by various people including myself all along the years: The presentation shows only a date and not a date-and-time, so the storage should also do a date alone. Unfortunately the conversion from date-and-time to date is ambiguous because the conversion depends on the time zone for which it is done. This is exactly this bugreport here. Switching from a date-and-time type to a pure date type will also solve this bug.