Python: Usage of PyDateTime_FromTimestamp
问题 I'm working on a python c-extension and want to create an instance of python datetime object with a unix timestamp. On the documentation site ( http://docs.python.org/c-api/datetime.html ) I found the function PyDateTime_FromTimestamp() which returns a new reference based on an input parameter. The description is as follows: Create and return a new datetime.datetime object given an argument tuple suitable for passing to datetime.datetime.fromtimestamp(). I tried out to call the function with