forked from NoLog.cz/trhlina-calendar
fixes weird time bug
for some reason, reocurring events were offset. Don't know why.
This commit is contained in:
parent
936aa10e19
commit
d9b4128359
1 changed files with 2 additions and 0 deletions
|
@ -62,7 +62,9 @@ def create_event_list(json):
|
||||||
try:
|
try:
|
||||||
for reocurring_event in raw_event["upcoming_dates"]:
|
for reocurring_event in raw_event["upcoming_dates"]:
|
||||||
event_start_time = parse_time(reocurring_event["starts_at"][0:reocurring_event["starts_at"].find("+")]+"Z")
|
event_start_time = parse_time(reocurring_event["starts_at"][0:reocurring_event["starts_at"].find("+")]+"Z")
|
||||||
|
event_start_time = offset_time(event_start_time, -1)
|
||||||
event_end_time = parse_time(reocurring_event["ends_at"][0:reocurring_event["ends_at"].find("+")]+"Z")
|
event_end_time = parse_time(reocurring_event["ends_at"][0:reocurring_event["ends_at"].find("+")]+"Z")
|
||||||
|
event_end_time = offset_time(event_end_time, -1)
|
||||||
if event_end_time == None or event_start_time == event_end_time:
|
if event_end_time == None or event_start_time == event_end_time:
|
||||||
event_end_time = offset_time(event_start_time, 1.5)
|
event_end_time = offset_time(event_start_time, 1.5)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue