fix: Deprecated the datetime.utcfromtimestamp(). by shuchu · Pull Request #4306 · feast-dev/feast
Conversation
What this PR does / why we need it:
Change from
>>> dt_now = datetime.utcnow()
>>> dt_ts = datetime.utcfromtimestamp(1571595618.0)
to
>>> from datetime import timezone
>>> dt_now = datetime.now(tz=timezone.utc)
>>> dt_ts = datetime.fromtimestamp(1571595618.0, tz=timezone.utc)
Reference: https://blog.ganssle.io/articles/2019/11/utcnow.html
Which issue(s) this PR fixes:
Partial Fixes #4240
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
redhatHameed pushed a commit to RHEcosystemAppEng/feast that referenced this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters