Comment # 2 on bug 898974 from
and you are correct.
I have been debugging this all yesterday, and trying various things to resolve
it.
At first, I removed the "static" keyword, and added the function to the global
list. GnuCash would start, and fetch data, but ALL dates were displayed
incorrectly. First time, ALL dates were a certain date in 2011. Second run, all
had same date, of sometime in 2013.
I tried to debug this, but my programming skills need lots of work.
So in the end, I removed my modifications, and kept the function local, but
modified the gnucash code to mimic it instead of using, and that worked like a
charm. I'll paste what I did, which I know is a horrible hack, and probably
ineffecient.. But at least I can do my finances :P

in gnucash-2.6.3/src/backend/dbi/gnc-backend-dbi.c

around line 2041:

   guint64 row = dbi_result_get_currow (result);
   guint idx = dbi_result_get_field_idx (result, col_name) - 1;
/* time64 time =
_dbi_make_datetime(result->rows[row]->field_values[idx].d_datetimex); */
   dbi_datetimex dtx = result->rows[row]->field_values[idx].d_datetimex;
   struct tm copy = dtx.tm;
   time64 time = timegm(&copy) - dtx.utc_offset;
   (void)g_value_init( value, G_TYPE_INT64 );


You are receiving this mail because: