-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
returned date incorrect caused by TZ rollover #610
Comments
Basically this library is full of footguns because it tries to rely on bare |
@Reeywhaar general criticism is not helpful. you are welcome to show your talent and provide a better solution. I don't have time or the inclination our app uses an ICS parser that uses this library. and I support the calendar component, so I'm sorta stuck. |
In my case what I've done is stopped using So basically I don't use anything tz related in rrule because this is unreliable as hell. All incoming parameters in rrule are in local timezone. Also in case of finding occurences you have to convert incoming parameters (after and before). First to timezone of dtstart, and then assign local timezone. |
here is my fix : ` inputtime = sys.argv[1] start = datetime.fromtimestamp(float(inputtime)/1000) ruleObj = rrulestr(rules, dtstart=start) |
I'm sure this library can do a lot of things. Creating date recurrences that respect timezones and daylight saving times unfortunately isn't one of them. If you want to do this, you've picked the wrong tool. Anyone who ends up here, might want to check out rschedule. It comes with adapters for many popular date libraries, such as moment.js and Luxon, as well as vanilla JS Date. It doesn't see much activity and documentation isn't exactly exhaustive, but from the few usage examples and the codesandbox one will quickly figure out how to use it. It sports a modular approach and pluggable features, such as JSON and iCal support. Hope this helps. |
Reporting an issue
Thank you for taking an interest in
rrule
! Please include the following inyour report:
creating a new one
are using such as the exact RRule string and dates.
rrule
you are using$ date
from the command lineof the machine showing the bug)
os info
local tz, America/Denver
Wed Dec 13 01:40:55 PM MST 2023
sample code
results
from package,json
remove tzid no change
The text was updated successfully, but these errors were encountered: