[calendar] add timezone parameter to calendarevent in order order do get the good date/hours in ical exports
This commit is contained in:
parent
33393780ab
commit
0936e1dfc4
6 changed files with 28 additions and 3 deletions
|
|
@ -128,6 +128,19 @@ class AgendadulibreModule(Module, CapCalendarEvent):
|
|||
return self.browser.get_event(event_id)
|
||||
|
||||
def fill_obj(self, event, fields):
|
||||
return self.browser.get_event(event.id, event)
|
||||
event = self.browser.get_event(event.id, event)
|
||||
choice = self.config['region'].get().split('#')
|
||||
selected_region = '' if len(choice) < 2 else choice[-1]
|
||||
if selected_region == '23':
|
||||
event.timezone = 'America/Guadeloupe'
|
||||
elif selected_region == '24':
|
||||
event.timezone = 'America/Guyana'
|
||||
elif selected_region == '26':
|
||||
event.timezone = 'Indian/Reunion'
|
||||
elif selected_region == '25':
|
||||
event.timezone = 'America/Martinique'
|
||||
else:
|
||||
event.timezone = 'Europe/Paris'
|
||||
return event
|
||||
|
||||
OBJECTS = {AgendadulibreBrowser: fill_obj}
|
||||
|
|
|
|||
|
|
@ -645,4 +645,5 @@ class AllocineBrowser(Browser):
|
|||
event.location = location
|
||||
event.start_date = start_date
|
||||
event.summary = summary
|
||||
event.timezone = 'Europe/Paris'
|
||||
yield event
|
||||
|
|
|
|||
|
|
@ -30,3 +30,4 @@ class HybrideCalendarEvent(BaseCalendarEvent):
|
|||
self.transp = TRANSP.TRANSPARENT
|
||||
self.status = STATUS.CONFIRMED
|
||||
self.category = CATEGORIES.CINE
|
||||
self.timezone = 'Europe/Paris'
|
||||
|
|
|
|||
|
|
@ -28,3 +28,4 @@ class RazibusCalendarEvent(BaseCalendarEvent):
|
|||
self.transp = TRANSP.TRANSPARENT
|
||||
self.status = STATUS.CONFIRMED
|
||||
self.category = CATEGORIES.CONCERT
|
||||
self.timezone = 'Europe/Paris'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue