From 3ff34c4f120b5cc24df72bc98113a7bb8f21dc8a Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Fri, 7 Nov 2008 21:02:43 +0000 Subject: [PATCH] Bug #339433: FIx price quote dates off by one day This bug is related to all the rest of the date-time issues, but has an additional twist because of finance-quote. Somewhere between the fq-helper and the price db, gnucash rolls the quote through timespecCanonicalDayTime(), wherein it first runs localtime_r(), to produce, presumably, "2008-11-03 19:00:00" for my Eastern US location. Having now screwed up the date, gnucash runs gnc_tm_set_day_middle() on it to enter the price in the pricedb as of noon on the wrong date. Patch by David Reiser. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17680 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/quotes/gnc-fq-helper.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/quotes/gnc-fq-helper.in b/src/quotes/gnc-fq-helper.in index 8c4b7d6e22..e518d92de5 100644 --- a/src/quotes/gnc-fq-helper.in +++ b/src/quotes/gnc-fq-helper.in @@ -210,7 +210,11 @@ sub get_quote_time { } my $parsestr = $datestr; - if($timestr) { + if(!$timestr) { + #fix date handling for quotes with no time. + #Keeps gnucash from getting date wrong in west longitude places. + $parsestr .= " 12:00:00" + } else { $parsestr .= " $timestr"; }