Timezone support
See original GitHub issueI think we should support a timezone option for creating recurrence rules. I don’t think this is necessary in date-based scheduling, as it accepts a date and you can easily make a JS Date with timezone input using moment-timezone + moment’s .toDate()… or use UTC / milisecs. However, the only way (as far as I know) to schedule recurrence rules by timezone right now that doesn’t depend on system time is comparing the intended time you want to schedule X (timezone-specific, use moment timezone or an ISO string to make the date etc) against the current time (in your system’s timezone) to figure out what “hour” and “day” should be used for the recurring rule.
As per implementation, using moment-timezone is probably our best bet, but I’m open to any other options. I’d think the API should look something like a recurrence rule accepting the option of timezone
i.e. rule.timezone = 'America/Los_Angeles'
Thoughts, @santigimeno?
Issue Analytics
- State:
- Created 8 years ago
- Comments:28 (15 by maintainers)
I had to dig a bit through cron-parser and the source of this library, but this functionality does exist at least for cron-like jobs.
Example that works for me:
wow, got back here after 1 year for the same reason. still no support for timezone?