diff options
author | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-11-17 21:31:05 +0100 |
---|---|---|
committer | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-11-17 21:31:05 +0100 |
commit | d037aec415c79c8778b1c81d11ff3442e262895a (patch) | |
tree | c4778c6715a16bbab94edf77a3a4cf6ed4b7cc25 /lib | |
parent | 9061b8961eb5cefd31eba9314a5932f35f524eac (diff) | |
download | Nim-d037aec415c79c8778b1c81d11ff3442e262895a.tar.gz |
Fixes times.toSeconds to handle hours and minutes correctly.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/times.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim index 80a5ad8d3..e967ef683 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -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 |