In the C API structure in datetime.h, I see the following type objects:
PyTypeObject *DateType;
PyTypeObject *DateTimeType;
PyTypeObject *TimeType;
PyTypeObject *DeltaType;
PyTypeObject *TZInfoType;
But there is no:
TimeZoneType
I need to instantiate a datetime.timezone object to make a datetime.datetime object aware.
I would have called:
PyObject *tzobj = PyObject_CallObject(PyDateTimeAPI->TimeZoneType, argList);
and then the replace(tzinfo=...) method on datetime object
But I can't do that.
What is the alternative to construct a aware datetime object from C/C++ ?