pub fn from_timestamp(py: Python, timestamp: i64) -> PyResult<&PyDate> {
        let time_tuple = PyTuple::new(py, &[timestamp]);

        // safety ensure that the API is loaded
        let _api = ensure_datetime_api(py);

        unsafe {
            let ptr = PyDate_FromTimestamp(time_tuple.as_ptr());
            py.from_owned_ptr_or_err(ptr)
        }
    }
/// Construct a `datetime.date` from a POSIX timestamp
///
/// This is equivalent to `datetime.date.fromtimestamp`
Construct a `datetime.date` from a POSIX timestamp
This is equivalent to `datetime.date.fromtimestamp`
Construct a ` datetime . date ` from a POSIX timestamp This is equivalent to ` datetime . date . fromtimestamp `
pub fn from_timestamp(py: Python, timestamp: i64) -> PyResult<&PyDate> {
        let time_tuple = PyTuple::new(py, &[timestamp]);
        // safety ensure that the API is loaded
        let _api = ensure_datetime_api(py);
        unsafe {
            let ptr = PyDate_FromTimestamp(time_tuple.as_ptr());
            py.from_owned_ptr_or_err(ptr)
        }
    }
pub fn from_timestamp ( py : Python , timestamp : i64 ) -> PyResult < & PyDate > { let time_tuple = PyTuple :: new ( py , & [ timestamp ] ) ; // safety ensure that the API is loaded let _api = ensure_datetime_api ( py ) ; unsafe { let ptr = PyDate_FromTimestamp ( time_tuple . as_ptr ( ) ) ; py . from_owned_ptr_or_err ( ptr ) } }
Construct a `datetime.date` from a POSIX timestamp
This is equivalent to `datetime.date.fromtimestamp`
Construct a ` datetime . date ` from a POSIX timestamp This is equivalent to ` datetime . date . fromtimestamp `
py
Python
timestamp
i64
py
Python
timestamp
i64