Skip to content
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

Calculating series with unknown timezones will produce infinite loop #320

Closed
murjam opened this issue Feb 1, 2019 · 2 comments
Closed

Comments

@murjam
Copy link

murjam commented Feb 1, 2019

Infinite loop inside rule iterations when timezone is not an IANA zone

The iterator callback function is never called, rule.all just consumes all the CPU.

How to reproduce:

const { rrulestr } = require('rrule');
const rule = rrulestr('DTSTART;TZID=US/Eastern:20181201T020000\nFREQ=WEEKLY;BYDAY=TU\nEXDATE:20190205T020000,20190108T020000');
rule.all(date => {
    // the iterator is never called
    console.log('Will never be printed');
    return false;
});

Not exactly sure what are the ingredients of the rule string for this to happen, but for sure the timezone has to be something the luxon library is not aware of. If the timezone in the rule string is an IANA zone, the problem does not arise.

Also seemes to be related to having the EXDATE sometimes.

  • rrule version: 2.6.0
  • operating system: tested on node:10-alpine and macOS Mojave v10.14.2
  • local timezone: tested on UTC and Europe/Tallinn (EET)
@davidgoli
Copy link
Collaborator

I'd welcome a pull request to fix this!

@procedurallygenerated
Copy link

@murjam @davidgoli

Is there a solution for this? I would love to help with a pull request am just not technical enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants