arkn98 opened a new pull request, #2996:
URL: https://github.com/apache/cassandra/pull/2996

   UTC offsets for a timezone can change over time. The current 
datetime_from_utc_to_local doesn't handle daylight savings, and uses the 
current UTC offset for timezones that may have had a different UTC offset in 
the past (see comments from [1]).
   
   Also, the UTC datetime objects obtained from the Datastax Python driver are 
naive (see [2]). Thus, to correctly convert them to the local timezone, we need 
to make them UTC "aware" objects first (using the replace()) before calling 
astimezone() (see [3]).
   
   [1] https://stackoverflow.com/a/19238551/9523462
   [2] 
https://docs.datastax.com/en/developer/python-driver/3.28/dates_and_times/#read-path
   [3] 
https://docs.python.org/3/library/datetime.html#datetime.datetime.astimezone
   
   Patch by Arun Ganesh; reviewed by TBD for CASSANDRA-18879


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to