Epic Calendar showing future events!

Contrast_Picker
Arcidayne 9 years ago
parent 9b84bfc453
commit 7b582efe7b

@ -129,7 +129,7 @@ function get_cal(epic)
string_offset = "%2b" .. string.format("%02d", math.floor(offset_utc/3600)) .. ":00" string_offset = "%2b" .. string.format("%02d", math.floor(offset_utc/3600)) .. ":00"
end end
local timeMin = os.date("%Y-%m-%dT%I:%M:%S" .. string_offset, os.time()) local timeMin = os.date("%Y-%m-%dT%H:%M:%S", os.time()) .. string_offset
rpage = "https://www.googleapis.com/calendar/v3/calendars/" .. calid .. "/events?key=" .. key .. "&timeMin=" .. timeMin rpage = "https://www.googleapis.com/calendar/v3/calendars/" .. calid .. "/events?key=" .. key .. "&timeMin=" .. timeMin
@ -152,6 +152,7 @@ function get_cal(epic)
ColourNote("cyan", "", "Debugging information:\n", "white", "", "rpage: " .. rpage .. "\nstring_offset: " .. string_offset .. "\noffset_utc: " .. offset_utc .. "\ntimeMin: " .. timeMin, "cyan", "", "\nEnd of information\n") ColourNote("cyan", "", "Debugging information:\n", "white", "", "rpage: " .. rpage .. "\nstring_offset: " .. string_offset .. "\noffset_utc: " .. offset_utc .. "\ntimeMin: " .. timeMin, "cyan", "", "\nEnd of information\n")
end end
if epage then
if epage.items[1] then if epage.items[1] then
for i = 1, #epage.items do for i = 1, #epage.items do
starttime, summary = "", epage.items[i].summary or "No summary found!" starttime, summary = "", epage.items[i].summary or "No summary found!"
@ -169,6 +170,9 @@ function get_cal(epic)
end end
table.insert(cal_output, summary .. get_local_time(starttime) .. date_note(starttime)) table.insert(cal_output, summary .. get_local_time(starttime) .. date_note(starttime))
end end
else
ColourNote("cyan", "", "Epic Calendar Error! Something went very wrong trying to get the epage. Let Arcidayne know!")
end
local header_string = " Upcoming Runs (Local time) " local header_string = " Upcoming Runs (Local time) "

Loading…
Cancel
Save