Lines 1-18
Link Here
|
1 |
--- lib/ofx_utilities.cpp.orig 2013-04-16 19:50:51 UTC |
1 |
--- lib/ofx_utilities.cpp.orig 2013-04-16 19:50:51 UTC |
2 |
+++ lib/ofx_utilities.cpp |
2 |
+++ lib/ofx_utilities.cpp |
3 |
@@ -115,9 +115,14 @@ time_t ofxdate_to_time_t(const string of |
3 |
@@ -115,6 +115,11 @@ time_t ofxdate_to_time_t(const string ofxdate) |
4 |
char time_zone_specified = false; |
4 |
char time_zone_specified = false; |
5 |
string ofxdate_whole; |
5 |
string ofxdate_whole; |
6 |
time_t temptime; |
6 |
time_t temptime; |
7 |
+ int daylight; |
7 |
+ int daylight = 0; |
8 |
+ const struct tm* t; |
8 |
+ |
9 |
+ |
9 |
+ tzset(); |
10 |
+ std::time(&temptime); |
10 |
+ if(tzname[1][0] != ' ') |
11 |
+ t = localtime(&temptime); |
11 |
+ daylight = 1; |
12 |
+ daylight = t->tm_isdst; |
|
|
13 |
|
12 |
|
14 |
time.tm_isdst = daylight; // initialize dst setting |
13 |
time.tm_isdst = daylight; // initialize dst setting |
15 |
- std::time(&temptime); |
14 |
std::time(&temptime); |
16 |
local_offset = difftime(mktime(localtime(&temptime)), mktime(gmtime(&temptime))) + (3600 * daylight); |
|
|
17 |
|
18 |
if (ofxdate.size() != 0) |