-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
Hello there,
Although as of 1.7.0, deprecation of datetime.utcnow() was delt with by @RazerM ( 5273fa2 ), it seems like datetime.utcfromtimestamp() also requires some attention.
The official datetime docs point out:
Warning: Because naive
datetimeobjects are treated by manydatetimemethods as local times, it is preferred to use aware datetimes to represent times in UTC. As such, the recommended way to create an object representing a specific timestamp in UTC is by callingdatetime.fromtimestamp(timestamp, tz=timezone.utc).
For context, stumbled upon the deprecation warning while unittesting dbt-core, as part of issue 9791. When drilling down the logs, ended up at:
Line 143 in e7cc074
| return datetime.utcfromtimestamp(timestamp) |
Metadata
Metadata
Assignees
Labels
No labels