1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

time: fix time.parse_iso8601(2037-07-23)?.add_days(181).str() == "1901-12-13 17:31:44"

This commit is contained in:
Delyan Angelov
2021-07-06 18:51:47 +03:00
parent 9f8c3cc159
commit 55eeb701a9
8 changed files with 29 additions and 16 deletions

View File

@@ -381,7 +381,7 @@ fn test_subtract() {
second: 3
microsecond: 100
})
t2 := unix2(int(t1.unix) + d_seconds, t1.microsecond + d_microseconds)
t2 := unix2(i64(t1.unix) + d_seconds, t1.microsecond + d_microseconds)
d1 := t2 - t1
d2 := t1 - t2
assert d1 > 0