| 284 | } |
| 285 | |
| 286 | Status PyTime_from_int(int64_t val, const TimeUnit::type unit, PyObject** out) { |
| 287 | int64_t hour = 0, minute = 0, second = 0, microsecond = 0; |
| 288 | RETURN_NOT_OK(PyTime_convert_int(val, unit, &hour, &minute, &second, µsecond)); |
| 289 | *out = PyTime_FromTime(static_cast<int32_t>(hour), static_cast<int32_t>(minute), |
| 290 | static_cast<int32_t>(second), static_cast<int32_t>(microsecond)); |
| 291 | return Status::OK(); |
| 292 | } |
| 293 | |
| 294 | Status PyDate_from_int(int64_t val, const DateUnit unit, PyObject** out) { |
| 295 | int64_t year = 0, month = 0, day = 0; |
no test coverage detected