Denis
01/12/2023, 2:08 PMAnna Geller
01/12/2023, 2:09 PMDenis
01/12/2023, 2:48 PMAnna Geller
01/13/2023, 1:53 PMDenis
01/16/2023, 10:10 AMAnna Geller
01/16/2023, 12:05 PMDenis
01/16/2023, 1:32 PMRRuleSchedule.from_rrule(rrule_set)
and in one specific case, I use dateutil.rruleset()
to set only rdates with timezone, but as I see from_rrule method only takes timezone from dtstart which is specified in dateutil.rrule, but in that case I need to define frequency which I don't want as it generates unnecessary dates and makes rrule string longer. To be more clear for following I expected output to be the same from this code:
rrule_set=rrule.rruleset()
rrule_set.rdate(pendulum.DateTime(2023,1,1,tzinfo=pendulum.timezone("Europe/Sarajevo")))
rrule_set.rdate(pendulum.DateTime(2023,2,1,tzinfo=pendulum.timezone("Europe/Sarajevo")))
rrule_set.rdate(pendulum.DateTime(2023,3,1,tzinfo=pendulum.timezone("Europe/Sarajevo")))
rrule_set.rdate(pendulum.DateTime(2023,4,1,tzinfo=pendulum.timezone("Europe/Sarajevo")))
pp(list(rrule_set))
dates=await RRuleSchedule.from_rrule(rrule_set).get_dates(n=10,start=pendulum.DateTime(2023,1,1,tzinfo=pendulum.timezone("Europe/Sarajevo")))
dates
output:
[DateTime(2023, 1, 1, 0, 0, 0, tzinfo=Timezone('Europe/Sarajevo')),
DateTime(2023, 2, 1, 0, 0, 0, tzinfo=Timezone('Europe/Sarajevo')),
DateTime(2023, 3, 1, 0, 0, 0, tzinfo=Timezone('Europe/Sarajevo')),
DateTime(2023, 4, 1, 0, 0, 0, tzinfo=Timezone('Europe/Sarajevo'))]
***************************
[DateTime(2023, 1, 1, 0, 0, 0, tzinfo=Timezone('UTC')),
DateTime(2023, 2, 1, 0, 0, 0, tzinfo=Timezone('UTC')),
DateTime(2023, 3, 1, 0, 0, 0, tzinfo=Timezone('UTC')),
DateTime(2023, 4, 1, 0, 0, 0, tzinfo=Timezone('UTC'))]
My question is I guess, is this intended behavior, in order to force dtstart to be defined or ..?Anna Geller
01/16/2023, 2:06 PMDenis
01/16/2023, 9:49 PMAnna Geller
01/16/2023, 9:52 PMDenis
01/16/2023, 10:01 PMAnna Geller
01/16/2023, 10:18 PM