Skip to content

Commit b4caf36

Browse files
committed
Temporary workaround for IntoPyObject constraint
1 parent 9f7ef44 commit b4caf36

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pyo3-arrow/src/scalar.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,18 +197,22 @@ impl PyScalar {
197197
TimeUnit::Second => arr
198198
.as_primitive::<TimestampSecondType>()
199199
.value_as_datetime_with_tz(0, tz)
200+
.map(|v| v.fixed_offset())
200201
.into_py_any(py)?,
201202
TimeUnit::Millisecond => arr
202203
.as_primitive::<TimestampMillisecondType>()
203204
.value_as_datetime_with_tz(0, tz)
205+
.map(|v| v.fixed_offset())
204206
.into_py_any(py)?,
205207
TimeUnit::Microsecond => arr
206208
.as_primitive::<TimestampMicrosecondType>()
207209
.value_as_datetime_with_tz(0, tz)
210+
.map(|v| v.fixed_offset())
208211
.into_py_any(py)?,
209212
TimeUnit::Nanosecond => arr
210213
.as_primitive::<TimestampNanosecondType>()
211214
.value_as_datetime_with_tz(0, tz)
215+
.map(|v| v.fixed_offset())
212216
.into_py_any(py)?,
213217
}
214218
} else {

0 commit comments

Comments
 (0)