MCPcopy Create free account
hub / github.com/apache/arrow / PyTime_from_int

Function PyTime_from_int

python/pyarrow/src/arrow/python/datetime.cc:286–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286Status 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, &microsecond));
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
294Status PyDate_from_int(int64_t val, const DateUnit unit, PyObject** out) {
295 int64_t year = 0, month = 0, day = 0;

Callers 1

VisitMethod · 0.85

Calls 2

PyTime_convert_intFunction · 0.85
OKFunction · 0.50

Tested by

no test coverage detected