From 7188f890c7fef9023371ebd40b7a376a1841f9e5 Mon Sep 17 00:00:00 2001 From: Dirk Sohler Date: Wed, 20 Oct 2021 18:58:24 +0200 Subject: [PATCH] use math.floor for processing the ingame timestamp fixes https://gitlab.com/4w/mtimer/-/issues/23 --- system/get_times.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/get_times.lua b/system/get_times.lua index 6522827..576ffba 100644 --- a/system/get_times.lua +++ b/system/get_times.lua @@ -193,7 +193,7 @@ end local get_ingame_time = function (player_name) local player = minetest.get_player_by_name(player_name) local format = player:get_meta():get_string(m.meta.ingame_time_format.key) - local time_of_day = tostring((minetest.get_timeofday() * 24000) * 3.6) + local time_of_day = math.floor((minetest.get_timeofday() * 24000) * 3.6) local ingame_timestamp = tonumber(string.format('%.0f', time_of_day)) local values = {