Timestamps in Gnucash Mysql
Phil Longstaff
plongstaff at rogers.com
Wed Aug 12 10:40:45 EDT 2009
Derek,
yes, I was planning to store w/o time zone, in UTC, but just wanted other people's input, because I know this has been a can of worms.
Phil
________________________________
From: Derek Atkins <warlord at MIT.EDU>
To: Phil Longstaff <plongstaff at rogers.com>
Cc: gnucash-devel at gnucash.org
Sent: Wednesday, August 12, 2009 9:22:24 AM
Subject: Re: Timestamps in Gnucash Mysql
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