-
-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yearly repeating events raise an error #47
Comments
I got this too and fixed it by adding few lines after event.all_day and before try: event.location in the file icalparser.py:
`
` So it adds timezone informations if until does not have one |
Since DTSTART is always given tzinfo, any UNTIL in an RRULE must be tz-aware and in UTC. See: jazzband#47
Weekly would occur the same also
I haven't looked deeply yet but just let me take a memo. |
This still seems to be an issue even on 0.1.25:
|
I ended up using: def fix_rule(rule):
if 'UNTIL' in rule:
rule['UNTIL'] = [normalize(r, tz=tz) for r in rule['UNTIL']]
return rule
# If dtstart is a datetime, make sure it's in a timezone.
rdtstart = component['dtstart'].dt
if type(rdtstart) is datetime:
rdtstart = normalize(rdtstart, tz=tz)
rrules = [fix_rule(x) for x in rrules]``` |
Since DTSTART is always given tzinfo, any UNTIL in an RRULE must be tz-aware and in UTC. See: jazzband#47
Consider this fragment:
When
icalevents
loads this event, it will normalize thedate
into adatetime
. But whendateutil.rrule
is called subsequently, it will object:Unfortunately, there are several places where start and end times are compared and the possibility of a mixture of
date
anddatetime
objects isn't handled.The text was updated successfully, but these errors were encountered: