diff options
author | John Wiegley <johnw@newartisans.com> | 2004-06-21 04:52:43 -0400 |
---|---|---|
committer | johnw <johnw@newartisans.com> | 2004-06-21 04:52:43 -0400 |
commit | c892e8c7ad0aaf6c47ff6e9075149a76188ae670 (patch) | |
tree | c21e7f6145722e430439b00785ebe63f609823bd /parse.cc | |
parent | 39ee2ae3d846b4bffa4e42ba4f3a9bc320ca9270 (diff) | |
download | fork-ledger-c892e8c7ad0aaf6c47ff6e9075149a76188ae670.tar.gz fork-ledger-c892e8c7ad0aaf6c47ff6e9075149a76188ae670.tar.bz2 fork-ledger-c892e8c7ad0aaf6c47ff6e9075149a76188ae670.zip |
fixes to price history support
Diffstat (limited to 'parse.cc')
-rw-r--r-- | parse.cc | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 |