From ea6e29d23fa5b79b9a4902450b867a48c3029d58 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 31 Dec 2016 12:33:50 -0500 Subject: [PATCH] fix python binding time_point conversion --- bindings/python/src/datetime.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/python/src/datetime.cpp b/bindings/python/src/datetime.cpp index e7c8674c2..7006872a8 100644 --- a/bindings/python/src/datetime.cpp +++ b/bindings/python/src/datetime.cpp @@ -70,7 +70,8 @@ struct time_point_to_python std::tm* date = std::gmtime(&tm); object result = datetime_datetime( (int)1900 + date->tm_year - , (int)date->tm_mon + // tm use 0-11 and we need 1-12 + , (int)date->tm_mon + 1 , (int)date->tm_mday , date->tm_hour , date->tm_min