From 54e6216cd2c66bf1cb12f0caaacad04e2a65a346 Mon Sep 17 00:00:00 2001 From: raizen Date: Thu, 28 Mar 2024 18:30:31 +0100 Subject: [PATCH] fully working release --- lua/sca_main.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/sca_main.lua b/lua/sca_main.lua index abe07ee..a80e0d6 100644 --- a/lua/sca_main.lua +++ b/lua/sca_main.lua @@ -54,7 +54,7 @@ local function sca_setup_timezone() summerTime = true elseif (month == 2) then // If its less than 6 days until end of the month (aka last Weekday in the month) and its sunday and its 3 am or later.... - if ((daysPerMonth[month] - day <= 6) && weekDay == 3 && hoursInSeconds >= 10800) then + if ((daysPerMonth[month] - day <= 6) && weekDay == 3 && hoursInSeconds >= 7200) then summerTime = true else summerTime = false @@ -71,7 +71,6 @@ local function sca_setup_timezone() end end -// Odd... Windows returns timezoned os.time, hmmm.... Need to check it on Linux local function sca_msg_to_player(time) if (msg[time] != nil) then for k, v in ipairs(player.GetHumans()) do @@ -87,9 +86,9 @@ local function sca_timer_loop() // Germany timezone in summer is UTC+1, in winter is UTC+2 if summerTime then - time = time + 3600 - else time = time + 7200 + else + time = time + 3600 end local timeModulo = time % 60