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

@ -18,7 +18,7 @@ fn solaris_utc() Time {
// and use the nanoseconds part
mut ts := C.timespec{}
C.clock_gettime(C.CLOCK_REALTIME, &ts)
return unix2(int(ts.tv_sec), int(ts.tv_nsec / 1000))
return unix2(i64(ts.tv_sec), int(ts.tv_nsec / 1000))
}
// dummy to compile with all compilers