Posting time bug fix proposal (simplified)

Stuart D. Gathman stuart at
Mon Aug 18 17:16:03 EDT 2008

On Mon, 18 Aug 2008, Stuart D. Gathman wrote:

> It takes more than a simple patch, but the date bug can be completely
> squashed by simply storing the timezone in the in memory register.  It could
> be as compact as a time_t plus a 1 byte index into a timezone table.  All
> register dates are displayed (and all scheduling done) relative to the
> associated timezone, not the system timezone.  This preserves the date, *and*
> the time of day across any changes to the system timezone, and is guaranteed
> not to break old versions (any more than they were already broken) or book
> closing code.
> It might not even be that bad a change to the register.  Add the tz field
> to the in memory data, and a tweak to the date display code.

The problem can be summarized as:

1) register display assumes all timezones are the same
2) transaction entry writes system timezone to file
3) if system timezone changes, register breaks

General solution categories are:

1) make all register timezones the same in file
2) make register use and store timezone internally

 	      Stuart D. Gathman <stuart at>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

More information about the gnucash-devel mailing list