petropavel13 / pg_rrule

RRULE data type for PostgreSQL
MIT License
164 stars 29 forks source link

DTSTART and RDATE throw an error #11

Closed AntJanus closed 8 years ago

AntJanus commented 8 years ago

I'm using pg_rrule to populate a database with dates. Here's a sample RRULE:

FREQ=WEEKLY;INTERVAL=5;UNTIL=20200906T050000Z;DTSTART=20160906T050000Z

I get an error MALFORMEDDATA. I tried substituting DTSTART with RDATE but get the same error. NO clue where to go from here.

@petropavel13 I saw another user mention this issue in #7

petropavel13 commented 8 years ago

which version of libical you're using? did you try with libical 2.0? this fork https://github.com/Falmarri/pg_rrule/tree/patch-1 works with libical 2.0

AntJanus commented 8 years ago

I'd rather not use a fork but will if that's the only choice. I'm building pg_rrule from scratch from the master branch.

I have a question however, and this might give me the ability to choice filter out DTSTART from the ruleset and store it separately, when using something like get_occurrences, is the second parameter pretty much a dtstart equivalent?

petropavel13 commented 8 years ago

Yes. You can use get_occurrences(rrule, timestamp with time zone) instead of DTSTART

AntJanus commented 8 years ago

awesome, thanks!