time_t - When does it break?
Stuart D. Gathman
stuart at gathman.org
Thu Jul 17 14:52:39 EDT 2008
Charles Day wrote:
>
> No, the transaction timestamp is stored, denoting the precise point in
> time at which the transaction posted. The time zone is only needed
> when converting to a date or time of day, and for that you have the
> user's preferences (a default display time zone, a time zone per
> account register, and a reporting time zone.)
Repeat after me: timestamps do not store date. Timestamps do not store
date. Your own example shows that timestamps do not store the date.
The date changes when the user changes timezone!!! As you just said
above: "The time zone is only needed when converting to a date ...".
That is precisely the problem. The time zone is needed when converting
to a date or time of day. Is the problem that people don't think dates
are important in accounting? Then why have the user enter a date ???
> Having a preference for a single time zone just means ignoring the OS
> time zone. If we were going to do this, then why even offer users an
> option, or save it? The GnuCash developers could just pick a time zone
> at random and go with that.
As long as only dates were ever displayed, that would work fine (other
than being kludgy, complicated and slow compared to storing dates) .
But some modules, like stock prices, need actual timestamps. And
displaying those in an arbitrary gnucash timezone would be highly
confusing to the end user.
More information about the gnucash-devel
mailing list