fix python binding time_point conversion
This commit is contained in:
parent
23a7e8d40a
commit
ea6e29d23f
|
@ -70,7 +70,8 @@ struct time_point_to_python
|
||||||
std::tm* date = std::gmtime(&tm);
|
std::tm* date = std::gmtime(&tm);
|
||||||
object result = datetime_datetime(
|
object result = datetime_datetime(
|
||||||
(int)1900 + date->tm_year
|
(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
|
, (int)date->tm_mday
|
||||||
, date->tm_hour
|
, date->tm_hour
|
||||||
, date->tm_min
|
, date->tm_min
|
||||||
|
|
Loading…
Reference in New Issue