5

I have a very simple project, using the rrule package:

npm init -f
npm i rrule

index.js file:

import { RRule, RRuleSet, rrulestr } from 'rrule';

const rule = RRule.fromString(
  "DTSTART;TZID=America/Denver:20181101T190000;\n"
  + "RRULE:FREQ=WEEKLY;BYDAY=MO,WE,TH;INTERVAL=1;COUNT=3"
)
rule.all();

Yet this gives the following message, three times:

Using TZID without Luxon available is unsupported. Returned times are in UTC, not the requested time zone

Why doesn't this work? I can see luxon is in the dependencies of the node_modules/luxon package. I've tried installing luxon into my own package too (npm i luxon), but with no success. What am I missing?

Nick Bull
  • 9,518
  • 6
  • 36
  • 58
  • I solved this with `yarn upgrade rrule` to upgrade my `rrule` node_module to the newest version – Zernach Feb 06 '23 at 18:11

1 Answers1

3

Seems like the issue started with version 2.6.6. A temporary solution would be to install a version that works. I did npm i rrule@2.6.4.

denyo910
  • 46
  • 4
  • Looks correct to me, although I solved this by using [`(new Date().getTimezoneOffset()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset`). I don't have the code to hand ,but once I do, I'll tack that on as a comment, for those who might be tied into a version – Nick Bull Jan 07 '21 at 15:38