Skip to content

Commit

Permalink
Clarify notes about ical timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
matti-lamppu committed Oct 11, 2024
1 parent 3ff2b98 commit 29448d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tilavarauspalvelu/models/reservation/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ def to_ical(self) -> bytes:

def _get_ical_timezone(self) -> Timezone:
"""Adds timezone information to the ical calendar event."""
# Note: This assumes that the ical Event is created in 'Europe/Helsinki' timezone.
timezone = Timezone()
timezone.add(TimezoneProperty.TZID, settings.TIME_ZONE)

# Taken from outlook generated iCal files
# Taken from outlook generated 'ical' files.
# These assumptions are valid for timezone which observe European Summer Time
# as currently defined (EU directive 2000/84/EC).
standard_start = datetime.datetime(1601, 10, 28, 4, 0, 0)
daylight_start = datetime.datetime(1601, 3, 25, 3, 0, 0)

Expand Down

0 comments on commit 29448d1

Please sign in to comment.