Hi,

I am writing some C++ code and importing into python via swig. I'd like to pass 
datetime objects to pass back to python. The following code will create a naive 
datetime after including datetime.h.

PyObject* ret = PyDateTimeAPI->DateTime_FromDateAndTime( y, m, d, h, m, s, u, 
Py_None, PyDateTimeAPI->DateTimeType);

I'd like to create a datetime object with UTC timezone info set. Much to my 
chagrin, I am having lots of trouble finding an example of how to do this. Any 
help would be appreciated.

Regards,
Grant.

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to