From owner-svn-ports-branches@freebsd.org Mon Jul 31 22:09:34 2017 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D181DBEEF4; Mon, 31 Jul 2017 22:09:34 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3AD36B1BD; Mon, 31 Jul 2017 22:09:33 +0000 (UTC) (envelope-from jhale@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6VM9X90064708; Mon, 31 Jul 2017 22:09:33 GMT (envelope-from jhale@FreeBSD.org) Received: (from jhale@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6VM9WVD064706; Mon, 31 Jul 2017 22:09:32 GMT (envelope-from jhale@FreeBSD.org) Message-Id: <201707312209.v6VM9WVD064706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhale set sender to jhale@FreeBSD.org using -f From: "Jason E. Hale" Date: Mon, 31 Jul 2017 22:09:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r447002 - in branches/2017Q3/finance/libofx: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: jhale X-SVN-Commit-Paths: in branches/2017Q3/finance/libofx: . files X-SVN-Commit-Revision: 447002 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 22:09:34 -0000 Author: jhale Date: Mon Jul 31 22:09:32 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) Modified: branches/2017Q3/finance/libofx/Makefile branches/2017Q3/finance/libofx/files/patch-lib_ofx__utilities.cpp Directory Properties: branches/2017Q3/ (props changed) Modified: branches/2017Q3/finance/libofx/Makefile ============================================================================== --- branches/2017Q3/finance/libofx/Makefile Mon Jul 31 22:03:45 2017 (r447001) +++ branches/2017Q3/finance/libofx/Makefile Mon Jul 31 22:09:32 2017 (r447002) @@ -3,6 +3,7 @@ PORTNAME= libofx PORTVERSION= 0.9.11 +PORTREVISION= 1 CATEGORIES= finance MASTER_SITES= SF/${PORTNAME}/${PORTNAME} Modified: branches/2017Q3/finance/libofx/files/patch-lib_ofx__utilities.cpp ============================================================================== --- branches/2017Q3/finance/libofx/files/patch-lib_ofx__utilities.cpp Mon Jul 31 22:03:45 2017 (r447001) +++ branches/2017Q3/finance/libofx/files/patch-lib_ofx__utilities.cpp Mon Jul 31 22:09:32 2017 (r447002) @@ -1,18 +1,14 @@ --- lib/ofx_utilities.cpp.orig 2013-04-16 19:50:51 UTC +++ lib/ofx_utilities.cpp -@@ -115,9 +115,14 @@ time_t ofxdate_to_time_t(const string of +@@ -115,6 +115,11 @@ time_t ofxdate_to_time_t(const string ofxdate) char time_zone_specified = false; string ofxdate_whole; time_t temptime; -+ int daylight; -+ const struct tm* t; -+ -+ std::time(&temptime); -+ t = localtime(&temptime); -+ daylight = t->tm_isdst; ++ int daylight = 0; ++ ++ tzset(); ++ if(tzname[1][0] != ' ') ++ daylight = 1; time.tm_isdst = daylight; // initialize dst setting -- std::time(&temptime); - local_offset = difftime(mktime(localtime(&temptime)), mktime(gmtime(&temptime))) + (3600 * daylight); - - if (ofxdate.size() != 0) + std::time(&temptime);