Open tamis-laan opened 5 years ago
Maybe this helps you:
result = component.getrruleset(addRDate=True)
if you then do
print(result[1], result[2])
It returns dates that follow those rules.
This is all docu i found: http://vobject.skyhouseconsulting.com/epydoc/
What i'm not able to do is to simply know if a given day meets that rrule or not (so i can easily know if the event happens today.).
I'm trying to work with
event.rrule
, I'm using the followingdateutile.rrule
function to get the dates:dates = dateutil.rrule.rrulestr(event.rrule.value,dtstart=event.dtstart.value)
However I get the following error:
ValueError: RRULE UNTIL values must be specified in UTC when DTSTART is timezone-aware
I have the following for: rrule.value:
FREQ=YEARLY;WKST=MO;UNTIL=20190328T235959Z
dtstart.value:2018-09-23
As you can see the rrule until date is timezoned while the dtstart is naive time. I also get the opposite of this where until can be naive and dtstart timezoned. So I need to convert one of there values to the appropriate timezone.
How can I do this? How can I obtain the UNTIL date?