time: use i64 in unix()
parent
1c847e04c8
commit
eb1ac5b30d
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue