From 04e2d3d5a88c88bb25edeeef83f37acfd03ba921 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 26 Aug 2024 22:58:15 -0700 Subject: fix: remove ms conversion in all ez weather and ez time functions --- src/eorzean_time.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/eorzean_time.rs') diff --git a/src/eorzean_time.rs b/src/eorzean_time.rs index 7021075..c12e8e1 100644 --- a/src/eorzean_time.rs +++ b/src/eorzean_time.rs @@ -137,8 +137,8 @@ pub fn convert_to_eorzean_time(input_time: T) -> (u8, u8) { let local_epoch = input_time.to_unix_timestamp(); let epoch = local_epoch as f64 * EORZEA_CONSTANT; - let minutes = (epoch / (1000.0 * 60.0)) % 60.0; - let bells = (epoch / (1000.0 * 60.0 * 60.0)) % 24.0; + let minutes = (epoch / 60.0) % 60.0; + let bells = (epoch / 3600.0) % 24.0; (bells as u8, minutes as u8) } -- cgit v1.2.3