diff --git a/src/CronDate.ts b/src/CronDate.ts index 2d5af91..dfadb99 100644 --- a/src/CronDate.ts +++ b/src/CronDate.ts @@ -169,7 +169,7 @@ export class CronDate { * Adds one second to the current CronDate. */ addSecond(): void { - this.#date = this.#date.plus({ seconds: 1 }); + this.#date = this.#date.plus({ seconds: 1 }).startOf('second'); } /** @@ -216,7 +216,7 @@ export class CronDate { * If the second is 0, it will subtract one minute instead. */ subtractSecond(): void { - this.#date = this.#date.minus({ seconds: 1 }); + this.#date = this.#date.minus({ seconds: 1 }).startOf('second'); } /**