Skip to content

Commit 6e11420

Browse files
author
Alexander Smishlajev
committed
fix Interval.from_seconds() with float argument
1 parent f77cdf8 commit 6e11420

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

roundup/date.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: date.py,v 1.76 2004-10-08 00:32:34 richard Exp $
18+
# $Id: date.py,v 1.77 2004-11-29 14:32:55 a1s Exp $
1919

2020
"""Date, time and time interval handling.
2121
"""
@@ -760,6 +760,7 @@ def from_seconds(self, val):
760760
'''Figure my second, minute, hour and day values using a seconds
761761
value.
762762
'''
763+
val = int(val)
763764
if val < 0:
764765
self.sign = -1
765766
val = -val

0 commit comments

Comments
 (0)