diff options
Diffstat (limited to 'calendar-cli.py')
-rwxr-xr-x | calendar-cli.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/calendar-cli.py b/calendar-cli.py index 98fc79d..7ad68a6 100755 --- a/calendar-cli.py +++ b/calendar-cli.py @@ -285,7 +285,7 @@ def calendar_agenda(caldav_conn, args): for event_cal in events_: for event in event_cal.instance.components(): dtstart = event.dtstart.value - if not hasattr(dtstart, 'tzinfo') or not dtstart.tzinfo: + if hasattr(dtstart, 'tzinfo') and not dtstart.tzinfo: dtstart = args.timezone.localize(dtstart) events.append({'dtstart': dtstart, 'instance': event}) events.sort(lambda a,b: cmp(a['dtstart'], b['dtstart'])) |