Skip to content

Commit 38a8458

Browse files
committedMar 17, 2025
Restore 4.x compatibility and use the current timezone for currentDate instead of setting it to UTC. Fixes #370
1 parent 839d9e2 commit 38a8458

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/CronExpressionParser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class CronExpressionParser {
9393
*/
9494
static parse(expression: string, options: CronExpressionOptions = {}): CronExpression {
9595
const { strict = false } = options;
96-
const currentDate = options.currentDate || new CronDate(undefined, 'UTC');
96+
const currentDate = options.currentDate || new CronDate();
9797

9898
expression = PredefinedExpressions[expression as keyof typeof PredefinedExpressions] || expression;
9999
const rawFields = CronExpressionParser.#getRawFields(expression, strict);

0 commit comments

Comments
 (0)
Please sign in to comment.