actual actual working release
This commit is contained in:
@@ -36,23 +36,23 @@ local function sca_setup_timezone()
|
|||||||
|
|
||||||
for i = 0, 11, 1 do
|
for i = 0, 11, 1 do
|
||||||
if (daysPastUnixYear - daysPerMonth[i] > daysPerMonth[i]) then
|
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)
|
daysPastUnixYear = daysPastUnixYear - (daysPerMonth[i] + 1)
|
||||||
else
|
else
|
||||||
daysPastUnixYear = daysPastUnixYear - daysPerMonth[i]
|
daysPastUnixYear = daysPastUnixYear - daysPerMonth[i]
|
||||||
end
|
end
|
||||||
month = month + 1
|
month = month + 1
|
||||||
else
|
else
|
||||||
day = daysPastUnixYear
|
day = daysPastUnixYear - daysPerMonth[i]
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local hourInSeconds = time % 86400
|
local hourInSeconds = time % 86400
|
||||||
|
|
||||||
if (month > 2 && month < 9) then
|
if (month > 1 && month < 9) then
|
||||||
summerTime = true
|
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 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
|
if ((daysPerMonth[month] - day <= 7) && weekDay == 3 && hoursInSeconds >= 3600) then
|
||||||
summerTime = true
|
summerTime = true
|
||||||
@@ -69,6 +69,10 @@ local function sca_setup_timezone()
|
|||||||
else
|
else
|
||||||
summerTime = false
|
summerTime = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print("summer?", summerTime)
|
||||||
|
print("month?", month)
|
||||||
|
print("day?", day)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function sca_msg_to_player(time)
|
local function sca_msg_to_player(time)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local conf = {
|
local conf = {
|
||||||
|
|
||||||
[85200] = '"Dies ist ein test Text!"'
|
[72480] = '"Dies ist ein test Text!"'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user