John Ralls
b9de55c871
Change gtkmacintegration-gtk2 include directory back to gtkmacintegration.
...
As of gtk-mac-integration-2.0.8.
2015-05-24 18:05:04 -07:00
John Ralls
54bf84af0e
Force -std=c11 when compiling against GLib-2.44 or greater.
...
Required for new G_DECLARE_INTERFACE macro.
2015-05-24 18:02:24 -07:00
John Ralls
8232927204
Fix compile failures on latest version of MinGW.
2015-05-22 20:59:06 -07:00
John Ralls
847e2c2717
Ensure BOOST_CPPFLAGS are included for boost test.
...
Necessary on Windows due to non-standard installation paths for dependencies.
2015-05-22 13:26:38 -07:00
John Ralls
8a77e139ce
Better check for C++11 compile error in custom_time_zone.hpp
...
It turns out that F20's boost-1.53 already has this fixed, so set the
boost version to 1.53 and test for the actual problem.
2015-05-11 16:55:15 -07:00
John Ralls
d0fc57a5a7
Change minimum boost version to 1.55
...
There was a C++11 compilation bust in
date_time/local_time/custom_time_zone.hpp, which was fixed in that
version. Since we also require C++11, that makes it the minimum
necessary.
2015-05-11 12:32:24 -07:00
John Ralls
e68c7eb959
Fix narrowing error with 32-bit time_t.
2015-05-10 16:52:35 -07:00
John Ralls
03d2ff1d44
Fix errant deletion of -I.
2015-05-08 15:24:20 -07:00
Mike Alexander
0017aa6edc
Support version 3 tzfile format which is almost the same as version 2.
...
See ftp://ftp.iana.org/tz/code/tzfile.5.txt.
2015-05-07 03:15:28 -04:00
Mike Alexander
541c779a13
Use the correct size for time offsets when parsing a tzfile.
...
A version 1 tzfile alwasy has 4 byte offsets and a version 2 has
8 byte offsets in the second half of the file.
2015-05-07 03:15:21 -04:00
John Ralls
d4c537a9a5
Merge branch 'boost-date'
...
Fix a couple more bugs which manifest on Fedora.
2015-05-04 15:54:45 -07:00
John Ralls
577aa3fe02
Catch out-of-range exception at beginning and end of TZFile on Fedora.
2015-05-04 15:54:07 -07:00
John Ralls
0b55c746c8
Link libgtest to test-kvp-value on Fedora.
2015-05-04 15:54:07 -07:00
John Ralls
42cca36445
Merge branch 'boost-date'
...
Some fixes plus GncDate::format().
2015-05-04 15:06:54 -07:00
John Ralls
90f0d9952c
Set gmock_root to gmock_src_path if the latter is detected.
...
Otherwise configure thinks gmock isn't installed.
2015-05-04 15:05:53 -07:00
John Ralls
725622f613
Ensure we compile C for at least C99.
2015-05-04 15:05:53 -07:00
John Ralls
ccbfeb3799
Reimplement qof_date print functions with GncDate::format()
2015-05-04 15:05:52 -07:00
John Ralls
269bb510fb
Implement GncDate::format()
...
Analog of GncDateTime::format().
2015-05-04 15:05:52 -07:00
John Ralls
2b84dfae8d
Remove some noisy comments.
...
That duplicate the Doxygen comments in the header.
2015-05-04 15:05:52 -07:00
John Ralls
e1e4391b03
Remove unused gnc_timezone function.
2015-05-04 15:05:52 -07:00
John Ralls
f4451ff57d
Remove gnc_gdate_range_check.
...
Since GncDate and GncDateTime will have the same limits it's not
necessary.
2015-05-04 15:05:52 -07:00
Benjamin Melançon
7c42908b13
Update README to refer to Git rather than SVN
2015-05-03 16:13:20 -07:00
John Ralls
9ea1dd0fac
Merge branch 'boost-date'
...
First merge, which replaces GDateTime with GncDateTime. GncDateTime is
implemented as a PImpl to a wrapper class for boost::date_time. A skeleton
implementation of GncDate is included. More work on that will go into the
next merge.
2015-05-02 17:40:33 -07:00
John Ralls
280589a33e
Adjust some tests for 64-bit.
...
The libc time functions are apparently not too smart about applying
timezones to date-times, using the current TZ info rather than the
one that applies to the date.
Formatting is a bit variable as well when localization is applied,
so test with the locale format when appropriate.
2015-05-02 17:39:05 -07:00
John Ralls
25be764cb0
Replace boost::posix_date::from_time_t().
...
It silently converts a 64-bit time_t to 32-bits.
2015-05-02 17:39:05 -07:00
John Ralls
b215d62925
Replace 'using make_week_num' with a macro; gcc-4.8 can't do that kind of alias.
2015-04-30 16:09:40 -07:00
John Ralls
9fafb61283
Restore #include strptime.h, needed on MinGW.
2015-04-30 16:08:24 -07:00
John Ralls
48a5473bbb
Add BOOST_LDFLAGS so that libboost_date_time can be found in MinGW.
2015-04-30 16:06:28 -07:00
John Ralls
9fbc447f74
Some gcc don't like having a struct ymd and a ymd() member function.
2015-04-30 12:23:25 -07:00
John Ralls
f87f9ca02d
gnc_date_today from GncDate.
2015-04-28 17:54:05 -07:00
John Ralls
bcedeff3ba
Fix the string constructor to apply the timezone correctly.
2015-04-28 17:53:35 -07:00
John Ralls
ac515d6ce2
Stop testing fractional seconds.
...
We don't use them in real code, so the new implementation isn't going to
support them.
2015-04-28 17:52:56 -07:00
John Ralls
a8028ec7f2
Remove aliases and boost::date_time construction functions from gnc-date.
2015-04-28 17:05:35 -07:00
John Ralls
f46e9f023c
Print functions to GncDateTime.
2015-04-28 17:04:09 -07:00
John Ralls
db6b7d368e
gnc_time to GncDateTime.
2015-04-28 17:03:20 -07:00
John Ralls
671a6ac75e
Remove extraneous try block.
2015-04-28 16:44:59 -07:00
John Ralls
d2f80a9407
gnc_mktime and gnc_timegm with GncDateTime.
2015-04-28 16:28:51 -07:00
John Ralls
2dde36d015
Do locality and gmtime with GncDateTime.
2015-04-28 15:22:15 -07:00
John Ralls
d4a3d862cf
Include gnc-datetime.hpp in gnc-date.cpp.
2015-04-28 14:19:00 -07:00
John Ralls
78b974ad79
Add gnc-datetime.cpp to the build.
2015-04-28 14:08:02 -07:00
John Ralls
ab72874ec1
Add GncDate and GncDateTime constructors and accessors:
...
GncDateImpl constructor and ymd accessor for GncDate
Std::string constructor and nsecs and GDate accessors for GncDateTime.
2015-04-28 13:40:48 -07:00
John Ralls
3f87f56e2e
Implement formatted output.
2015-04-28 10:48:56 -07:00
John Ralls
cbb01c94ae
Implement struct tm constructor and cast, offset accessor.
2015-04-28 10:48:56 -07:00
John Ralls
e5861dc119
Add operator time64() to enable static_casting a GncDateTime.
2015-04-28 10:48:56 -07:00
John Ralls
10daa27abc
Default constructors return the epoch.
...
GncDate::today() and GncDateTime::now() get the current date and time.
Suggested in a C++Now talk by Jeff Garland, the author of boost::date_time.
Reasoning is that getting time from the system clock is expensive and so
shouldn't be done unless needed.
2015-04-28 10:48:56 -07:00
John Ralls
01f5a9c04c
Update filename, copyright in comments for gnu-date.c
2015-04-28 10:48:56 -07:00
John Ralls
307c08e2b5
Begin GncDate and GncDateTime classes.
...
Goal is to get the boost::date_time code out of gnu-date.c, to provide
date-time functionality directly to C++, and to replace GDate.
2015-04-28 10:48:56 -07:00
John Ralls
09356976cc
Fix test-aqb timestamp so that it's 29 August in most timezones.
2015-04-28 10:48:55 -07:00
John Ralls
d0ae8c370e
Fix stray if and tab-indentation.
2015-04-28 10:48:55 -07:00
John Ralls
d0b916c6f9
Fix offset calculations for TZif2 files.
2015-04-28 10:48:55 -07:00