GNOME Bugzilla – Bug 792106
Wrong dates displayed
Last modified: 2018-06-30 00:02:25 UTC
Version 2.7.3, Windows 10 I have a couple transactions entered today, on 2018-01-01 with 2.6.19. After opening the database in 2.7.3 those are displayed in the register with the date 2018-10-13. The transaction post date is 20180101105900 and enter_date is 20171112033316. This has been entered from a recurring transaction. That would explain the enter date being so far in the past.
There are definitely NO splits with 2018-10-13 date in the Splits table. This is in a sqlite3 book.
I see what might be going on. My date fields are still 14-bytes long. Could be a database issue.
Splits.reconcile_date is 14-bytes but Transactions.post_date and .enter_date are 19.
*** Bug 792175 has been marked as a duplicate of this bug. ***
I'm also affected by this bug. As a workaround I wrote a python script to change the format of all dates to the new ISO format in my file.
Reminder: 2.7.3 is an UNSTABLE release. While I'm very grateful indeed that you're testing it, you should continue to use 2.6.19 for keeping your real books and use 2.7.3 only for testing on a *copy* of your books. Note very well that opening a SQLite3 database with 2.7.3 sets a flag that will stop you from being able to open that database in 2.6.19 precisely because of this date format change... the adaptive code will not be released until 2.6.20.
@Fabio, I created a simple SQL script that does this either way (2.6 -> 2.7 and back), in case somebody else finds it useful during testing: https://github.com/MisterY/gnucash-portfolio/blob/master/utils/dates_to_26.sql
Fixed in git. I'd mistakenly believed that boost::date_time would return not-a-date-time if the string supplied to operator>> didn't match the format supplied to the input facet. No such luck, so now I do a simple test on the string first and set the format accordingly. It should be faster and with some regexes should make for a more flexible system.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=792106. Please update any external references or bookmarks.