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



##########
File path: python/pyarrow/tests/strategies.py
##########
@@ -266,10 +277,12 @@ def arrays(draw, type, size=None, nullable=True):
         min_datetime = datetime.datetime.fromtimestamp(min_int64 // 10**9)
         max_datetime = datetime.datetime.fromtimestamp(max_int64 // 10**9)
         try:
-            offset_hours = int(ty.tz)
-            tz = pytz.FixedOffset(offset_hours * 60)
+            offset = ty.tz.split(":")
+            offset_hours = int(offset[0])
+            offset_min = int(offset[1])
+            tz = datetime.timedelta(hours=offset_hours, minutes=offset_min)
         except ValueError:
-            tz = pytz.timezone(ty.tz)
+            tz = zoneinfo.ZoneInfo(ty.tz)

Review comment:
       I added a `pytest.skip()` in case timezone is None and also used 
`timezones` from `pyarrow.tests.strategies` instead of `hypothesis.extra.pytz` 
(`tzst`) where relevant.




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