diff options
Diffstat (limited to 'python/py_times.cc')
-rw-r--r-- | python/py_times.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/py_times.cc b/python/py_times.cc index 00108b04..2d7ce662 100644 --- a/python/py_times.cc +++ b/python/py_times.cc @@ -83,11 +83,11 @@ typedef register_python_conversion<date, date_to_python, date_from_python> struct datetime_to_python { - static PyObject* convert(const moment_t& moment) + static PyObject* convert(const datetime_t& moment) { PyDateTime_IMPORT; date dte = moment.date(); - moment_t::time_duration_type tod = moment.time_of_day(); + datetime_t::time_duration_type tod = moment.time_of_day(); return PyDateTime_FromDateAndTime(dte.year(), dte.month(), dte.day(), tod.hours(), tod.minutes(), tod.seconds(), tod.total_microseconds() % 1000000); @@ -112,13 +112,13 @@ struct datetime_from_python int h = PyDateTime_DATE_GET_HOUR(obj_ptr); int min = PyDateTime_DATE_GET_MINUTE(obj_ptr); int s = PyDateTime_DATE_GET_SECOND(obj_ptr); - moment_t* moment = new moment_t(date(y,m,d), - moment_t::time_duration_type(h, min, s)); + datetime_t* moment = new datetime_t(date(y,m,d), + datetime_t::time_duration_type(h, min, s)); data->convertible = (void*)moment; } }; -typedef register_python_conversion<moment_t, datetime_to_python, datetime_from_python> +typedef register_python_conversion<datetime_t, datetime_to_python, datetime_from_python> datetime_python_conversion; void export_times() @@ -126,7 +126,7 @@ void export_times() date_python_conversion(); datetime_python_conversion(); - register_optional_to_python<moment_t>(); + register_optional_to_python<datetime_t>(); } } // namespace ledger |