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:
@ -23,8 +23,8 @@ fn C.timegm(&C.tm) C.time_t
|
||||
// fn C.gmtime_r(&tm, &gbuf)
|
||||
fn C.localtime_r(t &time_t, tm &C.tm)
|
||||
|
||||
fn make_unix_time(t C.tm) int {
|
||||
return int(C.timegm(&t))
|
||||
fn make_unix_time(t C.tm) i64 {
|
||||
return i64(C.timegm(&t))
|
||||
}
|
||||
|
||||
// local returns t with the location set to local time.
|
||||
|
Reference in New Issue
Block a user