Updated per code review comments
This commit is contained in:
parent
371deae98f
commit
d1f502ffd5
1 changed files with 1 additions and 3 deletions
|
|
@ -1284,8 +1284,7 @@ class datetime(date):
|
|||
A timezone info object may be passed in as well.
|
||||
"""
|
||||
if isinstance(t, float):
|
||||
frac = t - int(t)
|
||||
t = int(t)
|
||||
frac, t = _math.modf(t)
|
||||
us = round(frac * 1e6)
|
||||
if us >= 1000000:
|
||||
t += 1
|
||||
|
|
@ -1294,7 +1293,6 @@ class datetime(date):
|
|||
t -= 1
|
||||
us += 1000000
|
||||
else:
|
||||
frac = 0
|
||||
us = 0
|
||||
|
||||
if utc:
|
||||
|
|
|
|||
Loading…
Reference in a new issue