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

[Python] Recognize datetime.timezone.utc as UTC on conversion python->pyarrow

    XMLWordPrintableJSON

Details

    Description

      Related to ARROW-5248, but specifically for the stdlib datetime.timezone.utc, I think it would be nice to "recognize" this as UTC. Currently it is converted to "+00:00", while for pytz this is not the case:

      from datetime import datetime, timezone
      import pytz
      
      print(pa.array([datetime.now(timezone.utc)]).type)
      print(pa.array([datetime.now(pytz.utc)]).type)
      

      gives

      timestamp[us, tz=+00:00]
      timestamp[us, tz=UTC]
      

      Attachments

        Issue Links

          Activity

            People

              jorisvandenbossche Joris Van den Bossche
              jorisvandenbossche Joris Van den Bossche
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h