From 4275f93c57eed7c03f73e053a0225229c2eda2f0 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Sun, 24 Apr 2022 12:03:17 +0100 Subject: [PATCH] Ensure random times are generated correctly --- lib/src/fnc/rand.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/fnc/rand.rs b/lib/src/fnc/rand.rs index ead9518d..936e73ed 100644 --- a/lib/src/fnc/rand.rs +++ b/lib/src/fnc/rand.rs @@ -139,8 +139,8 @@ pub fn time(_: &Runtime, mut args: Vec) -> Result { } } 0 => { - let i = rand::random::(); - Ok(Datetime::from(i).into()) + let i = rand::random::(); + Ok(Datetime::from(i as i64).into()) } _ => unreachable!(), }