Skip to content

Windows timezones raise dateutil rrule exception #56

@sfaucheux

Description

@sfaucheux

I have a problem using Outlook calendar with "Romance Standard Time". gettz returns None since the python program is not run on Windows. It is also falling back to UTC with normal events.

However, with rrules it becomes worse. The normalize function will set the timezone of dtstart to None and rrulestr will throw an exception: ValueError: RRULE UNTIL values must be specified in UTC when DTSTART is timezone-aware since dtstart has no timezone and is supposed to have one.

So there are two problems:

  1. Windows timezones are only supported on Windows (according to the doc, not tested)
  2. When gettz gets an unsupported timezone it breaks the default fallback to UTC and causes an exception later.

The second one is easy to fix by checking the return value.
The first one might be problematic, it depends on what is wanted.
Cross platform support of timezones can be brought with a module such as pytz or by embedding a big dictionary, as long as bringing this support it is wanted for the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions