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

@ -80,5 +80,5 @@ fn darwin_utc() Time {
// get the high precision time as UTC clock
tv := C.timeval{}
C.gettimeofday(&tv, 0)
return unix2(int(tv.tv_sec), int(tv.tv_usec))
return unix2(i64(tv.tv_sec), int(tv.tv_usec))
}