Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/test_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def test_calendar_default_timezone():
- summary: February 1
begin: 2022-02-01 00:00:00 +02:00
duration: {hours: 1}

- summary: Earth day (all day)
begin: 2022-04-22
'''
))]
)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def test_rrule():
)
)
event_str = event.serialize()
assert 'DTEND' not in event_str
# DTEND exists and is the next day, calendar tools import this
# correctly as being a one-day event
assert 'RRULE:FREQ=YEARLY;UNTIL=20300422T000000' in event_str


Expand Down
2 changes: 1 addition & 1 deletion yaml2ics.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def event_from_yaml(event_yaml: dict, tz: tzinfo=None) -> ics.Event:
))

event.dtstamp = datetime.utcnow().replace(tzinfo=dateutil.tz.UTC)
if tz and event.floating:
if tz and event.floating and not event.all_day:
event.replace_timezone(tz)
return event

Expand Down