Set event times correctly
Instead of setting the timezone-aware (local) time of each event in every module, the icalendar module does it by default now. As a result, when importing events in any other module, the time will be correct.
This commit is contained in:
parent
83a2645e49
commit
22fbce4758
@ -39,6 +39,11 @@ def fetch_events():
|
|||||||
if events.all_day and events.duration.days > 1:
|
if events.all_day and events.duration.days > 1:
|
||||||
events.end = events.end.replace(days=-2)
|
events.end = events.end.replace(days=-2)
|
||||||
|
|
||||||
|
if not events.all_day:
|
||||||
|
events.begin = events.begin.to(get_tz())
|
||||||
|
events.end = events.end.to(get_tz())
|
||||||
|
|
||||||
|
|
||||||
""" The list upcoming_events should not be modified. If you need the data from
|
""" The list upcoming_events should not be modified. If you need the data from
|
||||||
this one, copy the list or the contents to another one."""
|
this one, copy the list or the contents to another one."""
|
||||||
#print(upcoming_events) # Print all events. Might look a bit messy
|
#print(upcoming_events) # Print all events. Might look a bit messy
|
||||||
|
Loading…
Reference in New Issue
Block a user