summaryrefslogtreecommitdiff
path: root/parse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'parse.cc')
-rw-r--r--parse.cc12
1 files changed, 11 insertions, 1 deletions
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