Skip to content

Commit

Permalink
ical: fall back to 30m duration + info message for evs w/o end/duration
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarnett committed Sep 26, 2024
1 parent 2e35e2f commit a4d5a23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ v4.5.0
reading an rc file you needed
* The `import` command now dumps events it couldn't import into a tmp rej.ics
file in a tmp directory for convenient retries
* `import` can also handle events w/o a dtend, using duration if available
* Determine date format to use based on system locale's in "When" inputs
* Respect locally-installed certificates (ajkessel)
* Re-add a `--noauth_local_server` to provide instructions for authenticating
Expand Down
6 changes: 5 additions & 1 deletion gcalcli/ics.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ def CreateEventFromVOBJ(
if hasattr(ve, 'duration') and ve.duration.value:
duration = ve.duration.value
else:
duration = timedelta(minutes=0)
printer.msg(
"Falling back to 30m duration for imported event w/o "
"explicit duration or end.\n"
)
duration = timedelta(minutes=30)
if verbose:
print('Duration.....%s' % duration)
end = ve.dtstart.value + duration
Expand Down

0 comments on commit a4d5a23

Please sign in to comment.