Created attachment 184288 [details] patch Hi, I'm working on a fix for a gnucash problem in FreeBSD, you can look at the progress here: https://github.com/Gnucash/gnucash/pull/116 While working on it I had to emulate glibc daylight global variable and found a simple way to fully emulate it. I'm attaching a patch to apply such full emulation to libofx, could this be accepted to be committed? Thanks.
Comment on attachment 184288 [details] patch LGTM
I lifted that code from OpenBSD many years ago (it's still in their ports) and my noob self probably didn't realize what the glibc daylight variable was supposed to do at the time. Oops! Thanks for looking into the matter!
A commit references this bug: Author: jhale Date: Mon Jul 31 13:07:23 UTC 2017 New revision: 446957 URL: https://svnweb.freebsd.org/changeset/ports/446957 Log: 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 Changes: head/finance/libofx/Makefile head/finance/libofx/files/patch-lib_ofx__utilities.cpp
(In reply to Jason E. Hale from comment #2) > I lifted that code from OpenBSD many years ago (it's still in their ports) > and my noob self probably didn't realize what the glibc daylight variable > was supposed to do at the time. Oops! Thanks for looking into the matter! Thanks a lot! I was pointed at the problems by the gnucash developers, since I maintain that port. Marking as closed!
Sorry, marking as open again for the merge. My bad!
A commit references this bug: Author: jhale Date: Mon Jul 31 22:09:33 UTC 2017 New revision: 447002 URL: https://svnweb.freebsd.org/changeset/ports/447002 Log: MFH: r446957 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 Approved by: ports-secteam (zi) Changes: _U branches/2017Q3/ branches/2017Q3/finance/libofx/Makefile branches/2017Q3/finance/libofx/files/patch-lib_ofx__utilities.cpp
2017Q3 merge complete.