price.date, transaction.post_date and neutral time
Sébastien de Menten
sdementen at gmail.com
Mon Feb 12 16:00:25 EST 2018
When I enter a new price for a given day for a security on the NASDAQ via
the price editor, it is stored in the date column the UTC time for that day
at 00:00:00 local time (CET=Europe, not EST=New-York). Which is weird
because across timezone, the day of the price will be interpreted
But John R says "that's an absolute time anchored in the market's time
zone, not the user's. " which leaves me puzzled as for the example above on
the NASDAQ it uses European time (i.e.my local time) not NASDAQ time. But
maybe when using the Perl finance quote program, there is a more complete
time information (incl the correct market timezone).
Anyway, my question was to understand the reasons of the encoding of a
day/date as an instant/datetime, reasons that are still a bit obscure
(except legacy issue)
On Feb 12, 2018 15:18, "Wm via gnucash-devel" <gnucash-devel at gnucash.org>
On 11/02/2018 12:33, Sébastien de Menten wrote:
> When exporting data from SQL backends, I see some inconsistencies in the
> handling of some date & datetime columns.
> In the prices table, when adding price via the price editor, I see in the
> date column a datetime with the UTC of the YYYY/MM/DD 00:00:00 of my local
> timezone (CET).
> For instance, for a price on 11/02/2018, I see 20180210230000, which is
> the UTC value for 11/02/2018 00:00:00+01:00.
> What is the reason of having the prices.date as a datetime type (vs a
> simple date type) ?
> Shouldn't it also be stored as 20180211105900, i.e. in neutral time as the
> field transaction.post_date ?
> In the transactions table, the post_date is handled as a date in gnucash
> but stored also in a datetime type with the neutral time (10:59:00).
> So for a transaction on 11/02/2018, I see 20180211105900.
> What is the reason of having the transactions.post_date as a datetime type
> (vs a simple date type) ?
> If the reason are mostly legacy, are there some plans to change that in 3.0
> IIRC the discussion at the time was about whether gnc should or could be
used for trading. the result was "no" and it was decided that the price db
should only have one entry per day (some people wanted multiple entries per
day in an attempt to use gnc for trading, that was never going to work as
gnc is a crap model for all the other stuff short term traders need, like
quick graphs, moving averages, etc).
given that, are you unhappy with the way gnc records date / price
gnucash-devel mailing list
gnucash-devel at gnucash.org
More information about the gnucash-devel