20 lines
702 B
Plaintext
20 lines
702 B
Plaintext
$OpenBSD: patch-lib_ofx_utilities_cpp,v 1.2 2012/09/09 20:27:48 landry Exp $
|
|
We don't support extern daylight
|
|
--- lib/ofx_utilities.cpp.orig Tue Apr 19 18:22:04 2011
|
|
+++ lib/ofx_utilities.cpp Sat Sep 8 12:07:05 2012
|
|
@@ -116,8 +116,13 @@ time_t ofxdate_to_time_t(const string ofxdate)
|
|
string ofxdate_whole;
|
|
time_t temptime;
|
|
|
|
- time.tm_isdst = daylight; // initialize dst setting
|
|
+ int daylight;
|
|
+ const struct tm* t;
|
|
std::time(&temptime);
|
|
+ t = localtime(&temptime);
|
|
+ daylight = t->tm_isdst;
|
|
+
|
|
+ time.tm_isdst = daylight; // iniitialize dst setting
|
|
local_offset = difftime(mktime(localtime(&temptime)), mktime(gmtime(&temptime))) + (3600 * daylight);
|
|
|
|
if (ofxdate.size() != 0)
|