diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2021-09-28 09:00:20 +0200 |
---|---|---|
committer | Tobias Brox <tobias@redpill-linpro.com> | 2021-09-28 09:00:20 +0200 |
commit | 91836fddfaf82f854f4a9cb94e28a903eb2e0fa2 (patch) | |
tree | 037dd007b5fe46bdf8082429a73c5cac515bded4 | |
parent | 301138ff8c7e76569b4f81d1f6cb94458328d41f (diff) | |
download | calendar-cli-91836fddfaf82f854f4a9cb94e28a903eb2e0fa2.zip |
possible fix for https://github.com/tobixen/calendar-cli/issues/85
-rwxr-xr-x | calendar-cli.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/calendar-cli.py b/calendar-cli.py index 72cb3a1..ec5993f 100755 --- a/calendar-cli.py +++ b/calendar-cli.py @@ -531,7 +531,9 @@ def calendar_agenda(caldav_conn, args): if hasattr(event['instance'], timeattr): event[timeattr] = getattr(event['instance'], timeattr).value if hasattr(event[timeattr], 'strftime'): - event[timeattr] = event[timeattr].astimezone(_tz(args.timezone)).strftime(args.timestamp_format) + if hasattr(event[timeattr], 'astimezone'): + event[timeattr] = event[timeattr].astimezone(_tz(args.timezone)) + event[timeattr] = event[timeattr].strftime(args.timestamp_format) else: event[timeattr] = '-' for textattr in vcal_txt_one: |