Commit Graph

9 Commits

Author SHA1 Message Date
John Ralls
765c117aac Optimize GncDateTime string constructor.
Turns out the stream facet parser is really slow. Since we have a
well-constrained universe of input formats we don't really need that
overhead. This got a 33% improvement in loading a large SQLite database.
2018-02-24 11:12:13 -08:00
John Ralls
ebbcd30f39 Save Changes Bug 792106 - Wrong dates displayed
The first attempt to fix this, a17bc85a, doesn't work because the
boost::date_time constructor gets enough information in most cases to
generate a date, just not the one we expect. This change looks for '-' in
the fourth position and if it's there assumes iso-extended format, otherwise
it assumes delimiter-less ISO without the 'T', i.e. %Y%m%d%H%M%S.
2018-01-09 14:58:43 -08:00
John Ralls
fcf88262ca Extract function tz_from_string.
Also changes from calculating the Bug 767824 offset to using
boost::date_time::local_time_in() and provides unit tests.
2018-01-09 14:08:42 -08:00
John Ralls
a17bc85a02 Enable reading undelimited YYYYMMDDHHMMSS time strings.
For backwards compatibility with 2.4 and 2.6 SQLite3 databases.
2017-12-23 15:40:21 -08:00
John Ralls
ac0d335c4f Revert post-construction adjustment of ldt for DST.
It was incorrect.\nMake corresponding adjustment to far eastern offset in neutral time adjustment.
2017-12-15 10:12:01 -08:00
John Ralls
a5134f91e1 Fix neutral time for consistent dates in mid-pacific time zones.
Echoes a change made some time ago in 2.6 where the time is adjusted from 10:59Z in time zones where that won't be the same date.
2017-12-12 21:02:11 -08:00
John Ralls
6db0820771 Fix offset handling in GncDateTime struct tm ctor, gnc_mktime, & gnc_timegm.
Tests now pass in all TZa from Honolulu to New Zealand.
2017-12-12 21:02:11 -08:00
Geert Janssens
1238b9d8cd Prevent gcc from searching config.h in the current directory
This will avoid a ninja-build from picking up a config.h generated by the autotools build
(in the root build directory). Picking up the wrong config.h may lead to all kinds of
subtle issues if the autotools run was done with different options than the cmake run.
2017-10-26 14:05:17 +02:00
Geert Janssens
83d14e1c1c Restructure the src directory
It is split into
- /libgnucash (for the non-gui bits)
- /gnucash (for the gui)
- /common (misc source files used by both)
- /bindings (currently only holds python bindings)

This is the first step in restructuring the code. It will need much
more fine tuning later on.
2017-08-10 18:45:00 +02:00