Use timezone for parsing events
This commit is contained in:
		| @@ -102,7 +102,8 @@ class Agenda(inkycal_module): | |||||||
|       parser.load_from_file(self.ical_files) |       parser.load_from_file(self.ical_files) | ||||||
|  |  | ||||||
|     # Load events from all icalendar in timerange |     # Load events from all icalendar in timerange | ||||||
|     upcoming_events = parser.get_events(today, agenda_events[-1]['begin']) |     upcoming_events = parser.get_events(today, agenda_events[-1]['begin'], | ||||||
|  |                                         self.timezone) | ||||||
|  |  | ||||||
|     # Sort events by beginning time |     # Sort events by beginning time | ||||||
|     parser.sort() |     parser.sort() | ||||||
|   | |||||||
| @@ -189,7 +189,7 @@ class Calendar(inkycal_module): | |||||||
|         parser.load_from_file(self.ical_files) |         parser.load_from_file(self.ical_files) | ||||||
|  |  | ||||||
|       # Filter events for full month (even past ones) for drawing event icons |       # Filter events for full month (even past ones) for drawing event icons | ||||||
|       month_events = parser.get_events(month_start, month_end) |       month_events = parser.get_events(month_start, month_end, self.timezone) | ||||||
|       parser.sort() |       parser.sort() | ||||||
|       self.month_events = month_events |       self.month_events = month_events | ||||||
|  |  | ||||||
| @@ -214,7 +214,8 @@ class Calendar(inkycal_module): | |||||||
|  |  | ||||||
|       # Filter upcoming events until 4 weeks in the future |       # Filter upcoming events until 4 weeks in the future | ||||||
|       parser.clear_events() |       parser.clear_events() | ||||||
|       upcoming_events = parser.get_events(now, now.shift(weeks=4)) |       upcoming_events = parser.get_events(now, now.shift(weeks=4), | ||||||
|  |                                           self.timezone) | ||||||
|       self._upcoming_events = upcoming_events |       self._upcoming_events = upcoming_events | ||||||
|  |  | ||||||
|       # delete events which won't be able to fit (more events than lines) |       # delete events which won't be able to fit (more events than lines) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user