emkornfield commented on a change in pull request #7604: URL: https://github.com/apache/arrow/pull/7604#discussion_r448445229
########## File path: cpp/src/arrow/python/arrow_to_pandas.cc ########## @@ -951,8 +951,21 @@ struct ObjectWriterVisitor { template <typename Type> enable_if_timestamp<Type, Status> Visit(const Type& type) { const TimeUnit::type unit = type.unit(); - auto WrapValue = [unit](typename Type::c_type value, PyObject** out) { + PyObject* tzinfo = nullptr; + if (!type.timezone().empty()) { + RETURN_NOT_OK(internal::StringToTzinfo(type.timezone(), &tzinfo)); + } + auto WrapValue = [unit, tzinfo](typename Type::c_type value, PyObject** out) { + OwnedRef tz(tzinfo); RETURN_NOT_OK(internal::PyDateTime_from_int(value, unit, out)); + RETURN_IF_PYERROR(); + if (tzinfo != nullptr) { + PyObject* with_tz = PyObject_CallMethod(*out, "astimezone", "O", tzinfo); Review comment: should always set UTC here first. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org