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
day's date. Previous efforts didn't work on Windows and shouldn't have elsewhere because gnc_localtime and gnc_mktime are inverse functions; in particular gnc_mktime doesn't adjust the time based on the value of tm_isdst, though some implementations of STDC mktime do. Rather than being too clever about trying to find the DST offset this implementation just uses 1 hour.
This commit is contained in:
@@ -337,13 +337,8 @@ fix_ofx_bug_39 (time64 t)
|
||||
#if HAVE_OFX_BUG_39
|
||||
struct tm stm;
|
||||
gnc_localtime_r(&t, &stm);
|
||||
if (!stm.tm_isdst)
|
||||
{
|
||||
time64 new_t;
|
||||
stm.tm_isdst = 1;
|
||||
new_t = gnc_mktime(&stm);
|
||||
t += t - new_t;
|
||||
}
|
||||
if (daylight && !stm.tm_isdst)
|
||||
t += 3600;
|
||||
#endif
|
||||
return t;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user