dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Fix-18015] [DST ISSUE] Handle DST issue when calculating yyyyMMdd±N time placeholders

Open iampratap7997-dot opened this issue 8 months ago • 3 comments

Was this PR generated or assisted by AI?

NO (Only the manual test case for America(Los_Angeles) timezone was created by AI to verify the fix.)

Purpose of the pull request

Fix #18048 DST issue when calculating $[yyyyMMdd±N] time placeholders.
Day-based calculations were previously implemented in minutes, which caused incorrect dates during Daylight Saving Time transitions.

Brief change log

1- Replaced minute-based day calculations with addDays for expressions like yyyyMMdd+N & yyyyMMdd-N. 2- Ensures correct date calculation in timezones with DST (e.g., America/Los_Angeles).

Verify this pull request

  • The fix was manually verified using America/Los_Angeles timezone around DST transition.
  • Unit tests cover existing placeholders (no new tests added, logic change only).

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md

iampratap7997-dot avatar Mar 06 '26 05:03 iampratap7997-dot

HI maintainers, Please add the milestone label for this PR .

Thanks, Divyansh.

iampratap7997-dot avatar Mar 07 '26 03:03 iampratap7997-dot

Hi ,

I've fixed the DST issue occurring in the recent test case and also addressed the Copilot issues. @jieguangzhou Could you please re-run the tests?

Thanks, Divyansh

iampratap7997-dot avatar Mar 10 '26 14:03 iampratap7997-dot

Please check the failed CI. @iampratap7997-dot

SbloodyS avatar Apr 07 '26 02:04 SbloodyS