use math.floor for processing the ingame timestamp

fixes https://gitlab.com/4w/mtimer/-/issues/23
This commit is contained in:
Dirk Sohler 2021-10-20 18:58:24 +02:00
parent e9ddeff9d1
commit 7188f890c7
No known key found for this signature in database
GPG Key ID: B9751241BD7D4E1A

@ -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 = {