Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9993

[Python] Tzinfo - string roundtrip fails on pytz.StaticTzInfo objects

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • Python
    • None

    Description

      Timezone roundtrip fails with pytz.StaticTzInfo objects on master:

      tz = pytz.timezone('Etc/GMT+1')
      pa.lib.string_to_tzinfo(pa.lib.tzinfo_to_string(tz))
      
      ---------------------------------------------------------------------------
      UnknownTimeZoneError                      Traceback (most recent call last)
      <ipython-input-4-b890180b2fad> in <module>
      ----> 1 pa.lib.string_to_tzinfo(pa.lib.tzinfo_to_string(tz))
      
      ~/Workspace/arrow/python/pyarrow/types.pxi in pyarrow.lib.string_to_tzinfo()
         1838         Time zone object
         1839     """
      -> 1840     cdef PyObject* tz = GetResultValue(StringToTzinfo(name.encode('utf-8')))
         1841     return PyObject_to_object(tz)
         1842
      
      ~/Workspace/arrow/python/pyarrow/error.pxi in pyarrow.lib.pyarrow_internal_check_status()
          120 cdef api int pyarrow_internal_check_status(const CStatus& status) \
          121         nogil except -1:
      --> 122     return check_status(status)
      
      ~/.conda/envs/arrow38/lib/python3.8/site-packages/pytz/__init__.py in timezone(zone)
          179                 fp.close()
          180         else:
      --> 181             raise UnknownTimeZoneError(zone)
          182
          183     return _tzinfo_cache[zone]
      
      UnknownTimeZoneError: '-01'
      

      Attachments

        Issue Links

          Activity

            People

              kszucs Krisztian Szucs
              kszucs Krisztian Szucs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: