-
Notifications
You must be signed in to change notification settings - Fork 523
Closed
Milestone
Description
Since 2.7, the following code fails in our project:
rule = rrule.rrulestr("RRULE:FREQ=WEEKLY;WKST=MO;BYDAY=MO,TU;UNTIL=20180331T200000Z")This is the error we see:
ValueError: RRULE UNTIL values must be specified in UTC when DTSTART is timezone-awareThe comment around the exception mentions this:
# According to RFC5545 Section 3.3.10:
# https://tools.ietf.org/html/rfc5545#section-3.3.10
#
# > If the "DTSTART" property is specified as a date with UTC
# > time or a date with local time and time zone reference,
# > then the UNTIL rule part MUST be specified as a date with
# > UTC time.We however do not specify the DTSTART property. Dateutil defaults to the current date in this case. However, said default does not have a timezone. Because we do however pass a timezone with our UNTIL property, we run into this exception.
Now I think you can make the argument that this is really our problem and it's probably best anyway to be specific with the DTSTART property (which is how we're going to work around this problem). However, I think it might also make sense to apply the timezone of the UNTIL property when the DTSTART date is created by dateutil.