Timestamps in Gnucash Mysql

Derek Atkins warlord at MIT.EDU
Wed Aug 12 09:22:24 EDT 2009


Phil Longstaff <plongstaff at rogers.com> writes:

> Also, sqlite does not have a datetime or timestamp but needs to use strings, 
> and I've been coding mainly for sqlite, with mysql and pgsql taking 2nd place.
>
> Gnucash has both dates, and date-times.  For dates, I can use CHAR(8) for 
> sqlite, DATE for mysql and pgsql.  For date-times, I can use CHAR(14) for 
> sqlite, TIMESTAMP for mysql and TIMESTAMP for pgsql.  Question: should the 
> pgsql be "TIMESTAMP WITH TIME ZONE" or "TIMESTAMP WITHOUT TIME ZONE"?

This opens up the whole can of worms regarding timestamps...

IMHO the db should store timeout a timezone, and it should store
everything in UTC.

Then there is the issue of the engine and ui interpretting UTC (or not)
as appropriate.

Like I said, can of worms...

> Phil

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list