actual actual working release
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user