On Sep 10, 2013, at 2:31 AM, Barry Brokensha <[email protected]> wrote:

> I am using Gnucash 2.4.13 with SQLite3 database. Using Price Editor if I
> manually enter a price and date (user:price editor) for a "Fund", the date
> shows on the front-end correctly as entered even if I close and re-open to
> view this entry. If however I use an ODBC connection (with Access) to the
> database and view the date in the PRICES Table for that entry, it is one
> day *earlier* than that entered. If the Fund price is obtained using
> Finance:Quote, the date shown in Price Editor and in the PRICES Table
> (back-end) are the same. It is therefore possible via the back-end to get 2
> prices for the same date where one is actually for the day before.
> e.g.
> 20130904220000 - date in PRICE table field "date"
> 2013-09-05 : date in user:price editor
> 
> Why this discrepancy? Am I missing something?

Gnucash's SQL backend stores dates in UTC and converts  them to local time for 
the UI.
When you enter a date in the Price editor (which can take only dates), it's set 
to midnight (00:00)
of that day.  Finance::Quote provides its own timestamps which include the 
time. It appears that
you local timezone is UTC +2 given that the date you entered is recorded as 2 
hours before 
midnight. You're probably getting quotes from European or American markets, 
neither of 
which are (yet) open at a time that would record UTC dates the day before. If 
you test with
Asian markets quotes (Hong Kong, Tokyo, Shanghai, etc.) between midnight and 
0200 your
time you may see the same effect.

Regards,
John Ralls


_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to