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

time: use i64 in unix()

This commit is contained in:
Alexander Medvednikov 2021-08-16 06:28:54 +03:00
parent 1c847e04c8
commit eb1ac5b30d

View File

@ -4,7 +4,7 @@
module time module time
// unix returns a time struct from Unix time. // unix returns a time struct from Unix time.
pub fn unix(abs int) Time { pub fn unix(abs i64) Time {
// Split into day and time // Split into day and time
mut day_offset := abs / seconds_per_day mut day_offset := abs / seconds_per_day
if abs % seconds_per_day < 0 { if abs % seconds_per_day < 0 {