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:
@ -20,7 +20,7 @@ pub fn unix(abs int) Time {
|
||||
hour: hr
|
||||
minute: min
|
||||
second: sec
|
||||
unix: u64(abs)
|
||||
unix: abs
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ pub fn unix2(abs i64, microsecond int) Time {
|
||||
minute: min
|
||||
second: sec
|
||||
microsecond: microsecond
|
||||
unix: u64(abs)
|
||||
unix: abs
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user