fix #16264 regression(0.18.0 => devel): import times; echo low(Time) gives OverflowDefect
This commit is contained in:
parent
66f958b313
commit
534c97edc5
2 changed files with 3 additions and 1 deletions
|
|
@ -1018,7 +1018,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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue