gnucash maint: Bug 769124 - Australian (GMT-10) OFX transactions imported have previous days date.
John Ralls
jralls at code.gnucash.org
Thu Oct 20 13:40:48 EDT 2016
Updated via https://github.com/Gnucash/gnucash/commit/6695ef95 (commit)
from https://github.com/Gnucash/gnucash/commit/c68452a4 (commit)
commit 6695ef9585c638650b97ce1dd9122095b9485008
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Oct 20 10:40:18 2016 -0700
Bug 769124 - Australian (GMT-10) OFX transactions imported have previous days date.
Fix on Windows, where the test failed to build.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 308d9a8..d48b2b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -292,8 +292,12 @@ ENDIF (WITH_AQBANKING)
IF (WITH_OFX)
GNC_PKG_CHECK_MODULES (LIBOFX REQUIRED libofx)
INCLUDE(CheckCXXSourceRuns)
- SET(CMAKE_REQUIRED_LIBRARIES "-lofx")
- CHECK_CXX_SOURCE_RUNS("
+ IF (WIN32)
+ SET(CMAKE_REQUIRED_LIBRARIES "-L ${CMAKE_PREFIX_PATH}/libofx/lib -lofx")
+ ELSE (WIN32)
+ SET(CMAKE_REQUIRED_LIBRARIES "-lofx")
+ ENDIF (WIN32)
+ CHECK_CXX_SOURCE_RUNS("
#include <time.h>
#include <stdlib.h>
#include <string>
@@ -306,8 +310,11 @@ int main(int argc, char** argv)
ts.tm_year = 116;
ts.tm_mon = 2;
ts.tm_mday = 19;
-
- setenv(\"TZ\", \"PST 08 PDT 07 M 4.1.0, M 10.6.0\", 1);
+#ifdef _WIN32
+ putenv(\"TZ=PST-8PDT-7,M 4.1.0/0,M 10.6.0/0\");
+#else
+ setenv(\"TZ\", \"PST 08P DT 07 M 4.1.0, M 10.6.0\", 1);
+#endif
time_t t = ofxdate_to_time_t(timestr);
if (t == mktime(&ts))
exit(1);
diff --git a/configure.ac b/configure.ac
index 3ee4e69..76dd371 100644
--- a/configure.ac
+++ b/configure.ac
@@ -808,8 +808,11 @@ struct tm ts;
ts.tm_year = 116;
ts.tm_mon = 2;
ts.tm_mday = 19;
-
+#ifdef _WIN32
+putenv(\"TZ=PST-8PDT-7,M 4.1.0/0,M 10.6.0/0\");
+#else
setenv("TZ", "PST 08 PDT 07 M 4.1.0, M 10.6.0", 1);
+#endif
time_t t = ofxdate_to_time_t(timestr);
if (t == mktime(&ts))
exit(0);
Summary of changes:
CMakeLists.txt | 15 +++++++++++----
configure.ac | 5 ++++-
2 files changed, 15 insertions(+), 5 deletions(-)
More information about the gnucash-changes
mailing list