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

time: turn Time.unix to i64, so it can represent times before 1970-01-01, fix time operators, add more tests (#11050)

This commit is contained in:
Delyan Angelov
2021-08-04 13:12:02 +03:00
committed by GitHub
parent 1bf6d04e37
commit efa8dcf4d2
15 changed files with 107 additions and 40 deletions

View File

@ -9,5 +9,5 @@ const (
// random returns a random time struct in *the past*.
pub fn random() time.Time {
return time.unix(int(rand.u64n(misc.start_time_unix)))
return time.unix(int(rand.i64n(misc.start_time_unix)))
}