MarcoGorelli opened a new issue, #46738:
URL: https://github.com/apache/arrow/issues/46738

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   ```python
   import pyarrow as pa
   import pyarrow.compute as pc
   from zoneinfo import ZoneInfo
   from datetime import datetime
   
   arr = pa.array([datetime(2020,1,1, tzinfo=ZoneInfo('Asia/Kathmandu'))])
   
   print(pc.strftime(arr.cast(pa.timestamp('us')), '%Y-%m-%d')) 
   print(pc.strftime(arr.cast(pa.date32()), '%Y-%m-%d')) 
   ```
   
   This outputs:
   ```
   [
     "2019-12-31"
   ]
   [
     "2020-01-01"
   ]
   ```
   
   So, when casting to `timestamp('us')`, it seems that PyArrow keeps the 
underlying timestamp the same but just reinterprets it in UTC
   
   But when casting to date, it does it according to the local time zone
   
   I don't know which one is right, but I'd have expected them to follow the 
same logic
   
   ### Component(s)
   
   Python


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to