diff --git a/lua/sca_main.lua b/lua/sca_main.lua index c1bb0b1..7f3c23b 100644 --- a/lua/sca_main.lua +++ b/lua/sca_main.lua @@ -36,23 +36,23 @@ local function sca_setup_timezone() for i = 0, 11, 1 do if (daysPastUnixYear - daysPerMonth[i] > daysPerMonth[i]) then - if (i == 2 && (year % 4 == 0 || (year % 400 == 0 && year % 100 != 0))) then + if (i == 1 && (year % 4 == 0 || (year % 400 == 0 && year % 100 != 0))) then daysPastUnixYear = daysPastUnixYear - (daysPerMonth[i] + 1) else daysPastUnixYear = daysPastUnixYear - daysPerMonth[i] end month = month + 1 else - day = daysPastUnixYear + day = daysPastUnixYear - daysPerMonth[i] break end end local hourInSeconds = time % 86400 - if (month > 2 && month < 9) then + if (month > 1 && month < 9) then summerTime = true - elseif (month == 2) then + elseif (month == 1) then // If its less than 6 days until end of the month (aka last Weekday in the month) and its sunday and its 1 am UTC or later.... if ((daysPerMonth[month] - day <= 7) && weekDay == 3 && hoursInSeconds >= 3600) then summerTime = true @@ -69,6 +69,10 @@ local function sca_setup_timezone() else summerTime = false end + + print("summer?", summerTime) + print("month?", month) + print("day?", day) end local function sca_msg_to_player(time) diff --git a/lua/sca_msg.lua b/lua/sca_msg.lua index f3d765c..4cc3b41 100644 --- a/lua/sca_msg.lua +++ b/lua/sca_msg.lua @@ -1,6 +1,6 @@ local conf = { - [85200] = '"Dies ist ein test Text!"' + [72480] = '"Dies ist ein test Text!"' }