summaryrefslogtreecommitdiff
path: root/src/pool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/pool.cc')
-rw-r--r--src/pool.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pool.cc b/src/pool.cc
index e21b900c..68ba3ed7 100644
--- a/src/pool.cc
+++ b/src/pool.cc
@@ -299,10 +299,16 @@ optional<price_point_t> commodity_pool_t::parse_price_directive(char * line)
if (std::isdigit(time_field_ptr[0])) {
symbol_and_price = next_element(time_field_ptr);
if (! symbol_and_price) return none;
+
datetime = parse_datetime(date_field + " " + time_field_ptr);
- } else {
+ }
+ else if (std::isdigit(date_field_ptr[0])) {
symbol_and_price = time_field_ptr;
- datetime = parse_datetime(date_field);
+ datetime = datetime_t(parse_date(date_field));
+ }
+ else {
+ symbol_and_price = date_field_ptr;
+ datetime = CURRENT_TIME();
}
string symbol;