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

expression has inconsistent behaviour for time ranges that span Daylight Saving Time change #273

Open
DonBrinn opened this issue Jun 27, 2022 · 0 comments
Labels

Comments

@DonBrinn
Copy link
Contributor

DonBrinn commented Jun 27, 2022

Steps to reproduce:

const parser = require('cron-parser');
let interval;

// the following call prints `'2020-11-01T06:10:00.000Z'`
interval = parser.parseExpression('* 10 1 * * 0', { tz: 'America/Toronto', currentDate: '2020-11-01T06:00:00.000Z' , endDate: '2020-11-01T06:30:00.000Z'}).next().toISOString();

// the following call has a slightly *larger* time range, but throws Error `Out of the timespan range`.
interval = parser.parseExpression('* 10 1 * * 0', { tz: 'America/Toronto', currentDate: '2020-11-01T05:55:00.000Z' , endDate: '2020-11-01T06:30:00.000Z'}).next().toISOString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants