freebsd-ports/finance/libofx/files/patch-lib_ofx__utilities.cpp
Jason E. Hale c87cf5e2f2 Fix Daylight Saving Time (DST) detection. Previous patch was erroneously
dectecting whether DST is currently in effect for the timezone (TZ) in use
instead of emulating the glibc global daylight variable which is set to 0 if
DST conversions should never be applied for the TZ in use; otherwise non-zero.

PR:		220665
Submitted by:	madpilot
MFH:		2017Q3
2017-07-31 13:07:22 +00:00

14 lines
394 B
C++

--- lib/ofx_utilities.cpp.orig 2013-04-16 19:50:51 UTC
+++ lib/ofx_utilities.cpp
@@ -115,6 +115,11 @@ time_t ofxdate_to_time_t(const string ofxdate)
char time_zone_specified = false;
string ofxdate_whole;
time_t temptime;
+ int daylight = 0;
+
+ tzset();
+ if(tzname[1][0] != ' ')
+ daylight = 1;
time.tm_isdst = daylight; // initialize dst setting
std::time(&temptime);