Merge pull request #677 from gradha/pr_fixes_times_calculation

Fixes times.toSeconds to handle hours and minutes correctly.
This commit is contained in:
Andreas Rumpf
2013-11-19 02:31:58 -08:00

View File

@@ -246,7 +246,8 @@ proc toSeconds(a: TTimeInfo, interval: TTimeInterval): float =
else:
curMonth.inc()
result += float(newinterv.days * 24 * 60 * 60)
result += float(newinterv.minutes * 60 * 60)
result += float(newinterv.hours * 60 * 60)
result += float(newinterv.minutes * 60)
result += float(newinterv.seconds)
result += newinterv.miliseconds / 1000