mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 769124 - Australian (GMT-10) OFX transactions imported have previous days date.
Fix on Windows, where the test failed to build.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user