Update datetime.py

This commit is contained in:
小染 2023-05-25 16:38:49 +08:00 committed by GitHub
parent d88c69a726
commit 606f586c6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -757,7 +757,7 @@ class datetime(date):
A timezone info object may be passed in as well.
"""
frac, t = math.modf(t)
us = round(frac * 1e6)
us = round(frac * 1000000)
if us >= 1000000:
t += 1
us -= 1000000