rdblue commented on code in PR #5667:
URL: https://github.com/apache/iceberg/pull/5667#discussion_r957709655
##########
python/pyiceberg/utils/datetime.py:
##########
@@ -35,7 +35,7 @@
def micros_to_days(timestamp: int) -> int:
"""Converts a timestamp in microseconds to a date in days"""
- return (datetime.fromtimestamp(timestamp / 1_000_000) -
EPOCH_TIMESTAMP).days
+ return timedelta(microseconds=timestamp).days
Review Comment:
Here, we can go directly to delta rather than going to date and subtracting.
--
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]