Bug 220665

Summary: finance/libofx: Improve and simplify daylight variable implementation
Product: Ports & Packages Reporter: Guido Falsi <madpilot>
Component: Individual Port(s)Assignee: Jason E. Hale <jhale>
Status: Closed FIXED    
Severity: Affects Only Me CC: jhale
Priority: --- Keywords: needs-qa
Version: LatestFlags: jhale: maintainer-feedback+
jhale: merge-quarterly+
Hardware: Any   
OS: Any   
URL: https://github.com/Gnucash/gnucash/pull/116
Attachments:
Description Flags
patch jhale: maintainer-approval+

Description Guido Falsi freebsd_committer freebsd_triage 2017-07-11 23:11:19 UTC
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 1 Jason E. Hale freebsd_committer freebsd_triage 2017-07-31 12:10:08 UTC
Comment on attachment 184288 [details]
patch

LGTM
Comment 2 Jason E. Hale freebsd_committer freebsd_triage 2017-07-31 12:41:41 UTC
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!
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-07-31 13:08:06 UTC
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
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2017-07-31 14:40:15 UTC
(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!
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2017-07-31 14:40:45 UTC
Sorry, marking as open again for the merge. My bad!
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-07-31 22:10:35 UTC
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
Comment 7 Jason E. Hale freebsd_committer freebsd_triage 2017-07-31 22:12:16 UTC
2017Q3 merge complete.