Describe the bug, including details regarding any error messages, version, and platform.
>>> ts = pd.Timestamp('2000-12-01 00:00:00+0000', tz='UTC')
>>> scal = pa.scalar(ts, type=pa.timestamp("ns", tz="UTC"))
>>> scal.cast(pa.string())
<pyarrow.StringScalar: '2000-12-01 00:00:00.000000000'>
>>>
No UTC "Z" suffix is present, but will be present when casting using arrays:
>>> dt_arr = pa.array([ts], type=pa.timestamp("ns", tz="UTC"))
>>> dt_arr.cast(pa.string())
<pyarrow.lib.StringArray object at 0x000002268498B340>
[
"2000-12-01 00:00:00.000000000Z"
]
>>>
When using the Timestamp array cast, the UTC "Z" suffix is preserved, when using the scalar, it's not preserved.
Component(s)
Python
Describe the bug, including details regarding any error messages, version, and platform.
No UTC "Z" suffix is present, but will be present when casting using arrays:
When using the Timestamp array cast, the UTC "Z" suffix is preserved, when using the scalar, it's not preserved.
Component(s)
Python