gnucash-2.3.1+postgres+postdate

Klaus Dahlke klaus.dahlke at gmx.de
Sun Jun 21 05:50:41 EDT 2009


Hi,
ooh, Im too old, daylight saving is end of October since 1996. So, the two hours time difference is okay. But there is another point to mention:

the entries in 'transactions' being created upon saving an xac-file as postgres database show a proper 'enter_date', newly manual created transaction show an arbitrary date:


               guid               |          currency_guid           | num |   post_date    |   enter_date   | description 
----------------------------------+----------------------------------+-----+----------------+----------------+-------------
 d17a12b82e8e9a021bfb3ae0d280efd7 | 408b1ad99a33c4d564c97e5fb5177cf2 |     | 20020308230000 | 20020309130341 | Apotheke
 edd75ec949671627cb54df40111bf359 | 408b1ad99a33c4d564c97e5fb5177cf2 |     | 20030117230000 | 20030118152534 | Apotheke
 ab82b0f56ac6dc5784ebc2424c2bd270 | 408b1ad99a33c4d564c97e5fb5177cf2 |     | 20090618220000 | c | Apotheke


Reconciling the the affected accounts doesn't change the 'enter_date'. Thus, for all manually created entires the 'enter_date' will be '19700101000000'.

Cheers,
Klaus


On Sun, 21 Jun 2009 00:18:40 +0200
Klaus Dahlke <klaus.dahlke at gmx.de> wrote:

> Hi all,
> I am experimenting a bit with the postgres backend. Saving as database, loading and working is fine. One of the reasons why I'd like to use the database backend is to do reporting via SQL or e.g. Rails.
> 
> The question I have is regarding the column 'post_date' in table 'transactions'. For some entries it shows some weird values:
> 
> gnucash=# select * from transactions where post_date='20061231230000';
>                guid               |          currency_guid           | num |   post_date    |   enter_date   | description  
> ----------------------------------+----------------------------------+-----+----------------+----------------+--------------
>  33b94fb54aacb4689dfeb2bfd5837618 | 408b1ad99a33c4d564c97e5fb5177cf2 |     | 20061231230000 | 20070102175105 | Kindergarten
> 
> 
> The transaction stems from a schedule transaction for the first of each month, here Jan., 1st 2007. But within the database the date is shown as timestamp in UTC (I live in Germany, UTC+1). Thus, running some analysis on 'post_date' would give me some wrong figures, because the entries would count for a wrong period(year or month).
> 
> I would have to add the difference between local time and UTC. It seems that during daylight saving time 2 hours are subtracted. In Germany daylight ends on the last weekend in September, but figures of October show also two hours difference. Is that some hard coded, that the month April incl October have a two hour offset, for the rest it is just one hour or shall the offset be according to the official daylight saving time?
> 
> How is the the date conversion handled when reading the database? That would help me to do have my reports in sync with the application. 
> 
> Thanks and best regards,
> Klaus
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.


More information about the gnucash-user mailing list