pitrou commented on a change in pull request #12522:
URL: https://github.com/apache/arrow/pull/12522#discussion_r834413860



##########
File path: cpp/src/arrow/python/datetime.cc
##########
@@ -461,18 +564,19 @@ Result<std::string> TzinfoToString(PyObject* tzinfo) {
     return PyTZInfo_utcoffset_hhmm(tzinfo);
   }
 
-  // try to look up zone attribute
-  if (PyObject_HasAttrString(tzinfo, "zone")) {
+  // if pytz is installed and tzinfo is and instance of pytz.BaseTzInfo

Review comment:
       ```suggestion
     // if pytz is installed and tzinfo is an instance of pytz.BaseTzInfo
   ```

##########
File path: cpp/src/arrow/python/datetime.cc
##########
@@ -482,7 +586,9 @@ Result<std::string> TzinfoToString(PyObject* tzinfo) {
 
   // try to look up _filename attribute
   // in case of dateutil.tz object

Review comment:
       Did you mean to keep these comments?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to