Ensure random times are generated correctly

This commit is contained in:
Tobie Morgan Hitchcock 2022-04-24 12:03:17 +01:00
parent 8e283ecaeb
commit 4275f93c57

View file

@ -139,8 +139,8 @@ pub fn time(_: &Runtime, mut args: Vec<Value>) -> Result<Value, Error> {
} }
} }
0 => { 0 => {
let i = rand::random::<i64>(); let i = rand::random::<i32>();
Ok(Datetime::from(i).into()) Ok(Datetime::from(i as i64).into())
} }
_ => unreachable!(), _ => unreachable!(),
} }