scyllapy icon indicating copy to clipboard operation
scyllapy copied to clipboard

Added a timezone object to the datetime object generated in cql_to_py for timestamps

Open ronharel02 opened this issue 1 year ago • 1 comments
trafficstars

I think this is a good addition for situations where timestamps queried from the database need to be compared with datetime objects acquired from other sources that may be set to a different timezone.

I'm not very acquainted with PyO3 so this can probably be implemented in a cleaner way... I would love to help improve this addition :)

ronharel02 avatar Jun 23 '24 19:06 ronharel02

I would disagree with this change, because timestamps are generally timezone independent.

https://stackoverflow.com/a/23062640

You can always assume that returned datetime in UTC. So, instead of calculating an offset, you can set it statically to UTC.

s3rius avatar Oct 31 '24 17:10 s3rius