1.1 --- a/tools/invite.py Sun Oct 15 23:22:28 2017 +0200
1.2 +++ b/tools/invite.py Sun Oct 15 23:30:38 2017 +0200
1.3 @@ -44,11 +44,18 @@
1.4 if not recipients:
1.5 raise ValueError("Recipients must be specified.")
1.6
1.7 + # Obtain a timezone.
1.8 +
1.9 + if len(tzids) > 1:
1.10 + raise ValueError("Only one timezone identifier should be given.")
1.11 +
1.12 + tzid = tzids and tzids[0] or get_default_timezone()
1.13 +
1.14 organiser = organisers[0]
1.15
1.16 # Create an event for the calendar with the organiser and attendee details.
1.17
1.18 - e = new_object("VEVENT", organiser)
1.19 + e = new_object("VEVENT", organiser, tzid=tzid)
1.20
1.21 attendees = []
1.22
1.23 @@ -60,13 +67,6 @@
1.24
1.25 e["ATTENDEE"] = attendees
1.26
1.27 - # Obtain a timezone.
1.28 -
1.29 - if len(tzids) > 1:
1.30 - raise ValueError("Only one timezone identifier should be given.")
1.31 -
1.32 - tzid = tzids and tzids[0] or get_default_timezone()
1.33 -
1.34 # Obtain the event periods converting them to datetimes.
1.35
1.36 if not from_datetimes: