-
Notifications
You must be signed in to change notification settings - Fork 116
Closed
Milestone
Description
I think the changelog should mention that this is a potentially breaking change, since the returned object is different, and the string formatting is different.
now = datetime.utcnow().timestamp()
y = datetime.utcfromtimestamp(now)
y
#> datetime.datetime(2024, 2, 21, 5, 37, 58, 761000)
print(y)
#> 2024-02-21 05:37:58.761000
x = datetime.fromtimestamp(now, timezone.utc)
x
#> datetime.datetime(2024, 2, 21, 5, 37, 58, 761000, tzinfo=datetime.timezone.utc)
print(x)
# 2024-02-21 05:37:58.761000+00:00Originally posted by @wch in #1142 (comment)
The returned value should have the same original print method and eject. However, we should not use the deprecated methods.
Metadata
Metadata
Assignees
Labels
No labels