Changed Entry Dates after updating from 2.6.4-2 to 2.6.6 and/or 2.6.7

John Ralls jralls at ceridwen.us
Sat Jul 11 23:16:38 EDT 2015


> On Jul 11, 2015, at 4:51 PM, Wm <wm+gnc at tarrcity.demon.co.uk> wrote:
> 
> Fri, 10 Jul 2015 23:04:58 <55A0418A.21048.151BE47 at Fred.Bone.dial.pipex.com>  Fred Bone <Fred.Bone at dial.pipex.com>
> 
>> On 10 July 2015 at 2:48, Wm said:
>> 
>>> Tue, 7 Jul 2015 08:07:59 <000c01d0b88c$0c59d350$250d79f0$@web.de> Detlef
>>> Kattenstroth <detlef.kattenstroth at web.de>
>>> 
>>> >please no, nothing is changing when I change the date settings in
>>> >preferences.
>>> 
>>> More details, please
>>> 
>>> Notes for others:
>>> 
>>> detlef is using a single file format on Win8.1 so it is
>>>  either
>>>    XML (which could be compressed) or
>>>    SQLite3
>>> Neither produce the same time jump generally so we need to look for
>>> something specific.
>> 
>> [...]
>>> I think this is going to be in the file rather than in the exe.
>>> 
>>> ===
>>> 
>>> Someone needs to pin down Detlef's file format.
>> 
>> I don't believe the file format will have anything to do with it.
> 
> Perhaps not, but we need to know if we are going to help.  Saying "Open it with an editor" is no use if it is compressed XML or SQLite3
> 
>> The
>> "today's date" which appears in the footer area of the window and in the
>> blank transaction is not derived from any file.
> 
> Today's date (bottom RHS) is similar in the two screenshots.
> 
> Last modified (bottom LHS) differs wildly.
> 
> In an XML file dates exist as bits of text, the file modification time is (I am almost certain) irrelevant.  Therefore if the same file (the screenshots suggest the same file) was opened in both gnc versions it is very hard to see how the two gnc versions could interpret dates but not money amounts so differently.
> 
> With a non-XML backend other possibilities exist.  It is something to get out of the way rather than a solution.
> 
> Triage.
> 
> Detlef:
> 
> if you do a directory or folder listing what are the dates for your file?
> 
> if you open a *copy* of your file in an editor like Notepad is it stuff you can read?

Wm,

Fred’s right that the blank transaction date isn’t from the file. It’s either the date when the register was opened or the last posted date used if a transaction has been created since the register was opened. Unless you think that Detlef is punking us, we can assume that it represents how GnuCash is interpreting the current date — shown in the taskbar in the lower-right of the screen shots — with a 1432015200 seconds offset. 

Interestingly, log2(1432015200) ~= 30.4, rather close to the size of an int32_t, though both GDateTime, GTimezone, and GnuCash are quite scrupulous about using int64_t for time representations. IIRC so is msvcrt.

It gets more interesting: 2.6.4 used glib-2.28 and 2.6.5 and later use glib-2.32. A significant change between the two is that the newer version has a rewritten Win32 section for gtimezone.c that among other things gets timezone information from the registry. It’s possible that the Win8.1 registry has a different timezone format, but if that were the case I think we would have
heard about it sooner. The traffic on this list and in Bugzilla indicates that there are lots of users on 8.1. The other possibility is that Detlef’s Registry TZ database has gotten corrupted somehow, though if that were true I’d think the system clock would reflect the problem too and it clearly doesn’t.

I don’t have all of the pieces assembled in my head yet, but I think that’s a more promising line of reasoning that is file format because the blank transaction is affected.

Regards,
John Ralls





More information about the gnucash-user mailing list