mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 03:02:31 +00:00
fix #16264 regression(0.18.0 => devel): import times; echo low(Time) gives OverflowDefect
(cherry picked from commit 534c97edc5)
This commit is contained in:
@@ -959,7 +959,7 @@ proc high*(typ: typedesc[Time]): Time =
|
||||
initTime(high(int64), high(NanosecondRange))
|
||||
|
||||
proc low*(typ: typedesc[Time]): Time =
|
||||
initTime(low(int64), 0)
|
||||
initTime(0, 0)
|
||||
|
||||
#
|
||||
# DateTime & Timezone
|
||||
|
||||
2
tests/misc/t16264.nim
Normal file
2
tests/misc/t16264.nim
Normal file
@@ -0,0 +1,2 @@
|
||||
import times
|
||||
doAssert low(Time) == fromUnix(0)
|
||||
Reference in New Issue
Block a user