From c892e8c7ad0aaf6c47ff6e9075149a76188ae670 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 21 Jun 2004 04:52:43 -0400 Subject: fixes to price history support --- parse.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'parse.cc') diff --git a/parse.cc b/parse.cc index 938983e0..e4850973 100644 --- a/parse.cc +++ b/parse.cc @@ -420,7 +420,7 @@ int parse_ledger(book * ledger, std::istream& in, case 'P': { // a pricing entry in >> c; - time_t date; + std::time_t date; std::string symbol; in >> line; // the date @@ -429,6 +429,16 @@ int parse_ledger(book * ledger, std::istream& in, << ": Failed to parse date: " << line << std::endl; break; } + + int hour, min, sec; + in >> hour; // the time + in >> c; + in >> min; + in >> c; + in >> sec; + date = std::time_t(((unsigned long) date) + + hour * 3600 + min * 60 + sec); + in >> symbol; // the commodity in >> line; // the price -- cgit v1.2.3