KaiSong-UK opened a new pull request, #18399:
URL: https://github.com/apache/dolphinscheduler/pull/18399

   ## What is the purpose of the pull request
   
   Fix the DST (Daylight Saving Time) timezone issue where system parameter 
expressions like \$[yyyyMMdd-1] produce incorrect results when the system 
timezone is set to a region with DST transitions (e.g., America/Los_Angeles).
   
   ## Brief change log
   
   - Modified \calcMinutes(String expression, Date date)\ in 
\TimePlaceholderUtils.java\ to use day-based arithmetic (\ddDays\) instead of 
minute-based arithmetic (\ddMinutes\) when the minute value is a multiple of 
24 hours (1440 minutes). This ensures correct day offset calculation across DST 
boundaries where a day may have 23 or 25 hours.
   
   ## Verifying this change
   
   The issue occurs specifically when:
   1. System timezone is set to a DST-observing timezone (e.g., 
America/Los_Angeles)
   2. Using date parameter expressions like \$[yyyyMMdd-1]
   3. The date falls on or near a DST transition day (e.g., March 9, 2026 for 
LA)
   
   Before fix: \Calendar.add(MINUTE, -1440)\ on March 9 00:10 LA time returns 
March 7 23:10 (two-day offset)
   After fix: \Calendar.add(DAY_OF_MONTH, -1)\ on March 9 00:10 LA time returns 
March 8 00:10 (correct one-day offset)
   
   ## Verify this pull request
   
   This pull request is already covered by existing tests.
   
   Closes #18015


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to