You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "victorsheng (via GitHub)" <gi...@apache.org> on 2026/01/16 06:01:04 UTC
[I] [Bug] [Dependent Task] Dependent task date range calculation ignores workflow schedule timezone [dolphinscheduler]
victorsheng opened a new issue, #17885:
URL: https://github.com/apache/dolphinscheduler/issues/17885
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues.
### What happened
When a workflow has a schedule with a specific timezone (e.g., `America/Mexico_City`), the dependent task's date range calculation for options like "today", "last1Days", "thisWeek", etc., does not respect the workflow's configured timezone. Instead, it uses the JVM's default timezone.
For example:
- JVM timezone: `Asia/Shanghai` (UTC+8)
- Workflow schedule timezone: `America/Mexico_City` (UTC-6)
- Dependent task configured to check "today"
The "today" date range is calculated based on `Asia/Shanghai` timezone, not `America/Mexico_City`. This causes incorrect dependency checking in cross-timezone scenarios.
### What you expected to happen
The dependent task's date range calculation should respect the workflow schedule's configured timezone. When a workflow is scheduled with `America/Mexico_City` timezone, the "today" date range should be calculated based on Mexico City's local date, not the JVM's timezone.
### How to reproduce
1. Set JVM timezone to `Asia/Shanghai` (or any timezone different from the schedule timezone)
2. Create a workflow with a schedule configured with timezone `America/Mexico_City`
3. Add a dependent task that checks for "today" completion of another workflow
4. Run the workflow when there's a date boundary difference between the two timezones (e.g., when it's Jan 16 in Shanghai but still Jan 15 in Mexico City)
5. Observe that the dependency check uses Shanghai's date range instead of Mexico City's
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
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: commits-unsubscribe@dolphinscheduler.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Master] Dependent task date range calculation based on workflow instance scheduling time zone [dolphinscheduler]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #17885:
URL: https://github.com/apache/dolphinscheduler/issues/17885#issuecomment-3930934833
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Master] Dependent task date range calculation based on workflow instance scheduling time zone [dolphinscheduler]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #17885: [Feature][Master] Dependent task date range calculation based on workflow instance scheduling time zone
URL: https://github.com/apache/dolphinscheduler/issues/17885
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Master] Dependent task date range calculation based on workflow instance scheduling time zone [dolphinscheduler]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #17885:
URL: https://github.com/apache/dolphinscheduler/issues/17885#issuecomment-4362455733
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Master] Dependent task date range calculation based on workflow instance scheduling time zone [dolphinscheduler]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #17885:
URL: https://github.com/apache/dolphinscheduler/issues/17885#issuecomment-4410877088
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Master] Dependent task date range calculation based on workflow instance scheduling time zone [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on issue #17885:
URL: https://github.com/apache/dolphinscheduler/issues/17885#issuecomment-3762545557
Currently, support for multi-time-zone scenarios is limited and is only well implemented for scheduled (time-based) workflows.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Master] Dependent task date range calculation based on workflow instance scheduling time zone [dolphinscheduler]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #17885:
URL: https://github.com/apache/dolphinscheduler/issues/17885#issuecomment-4149131852
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Feature][Master] Dependent task date range calculation based on workflow instance scheduling time zone [dolphinscheduler]
Posted by "victorsheng (via GitHub)" <gi...@apache.org>.
victorsheng commented on issue #17885:
URL: https://github.com/apache/dolphinscheduler/issues/17885#issuecomment-3770736402
The root cause of this issue is that the Master node utilizes the JVM's default timezone instead of the specific timezone defined in the Workflow's schedule configuration when calculating date ranges. This leads to time drift in cross-timezone environments.
I have categorized the types of tasks that are affected:
## 1. Dependent Tasks (Most Critically Affected)
This is the primary area identified in the issue.
Impact Point: When configuring "Dependent Periods" such as today, last1Days, thisWeek, or last7Days, the Master calculates the required date range based on the system's local time (JVM TZ).
Consequence: If the JVM is set to UTC+8 (Beijing) but the workflow is scheduled for UTC-6 (Central Standard Time), the Master may check for task status on the "wrong day" relative to the workflow's business logic, causing dependency check failures.
## 2. Tasks Using Time Placeholder Parameters
Any task type that relies on dynamic variables like $[yyyy-MM-dd] or $[add_months(yyyyMMdd, -1)] is vulnerable.
Impacted Tasks: Shell, SQL, Python, HTTP, and Data Integration tasks (DataX, Sqoop, SeaTunnel).
Impact Point: The TimePlaceholderResolver performs offset calculations based on schedule_time. If it fails to apply the workflow's specific timezone during calculation, the resulting date string will be incorrect.
Consequence: Scripts or queries will execute against the wrong data partitions (e.g., loading data for the 16th when it should be the 15th).
## 3. Data Quality Tasks
Impact Point: These tasks often use "Source/Target Filters" to define the scope of data validation.
Consequence: If these filters use timezone-sensitive dynamic parameters, the validation logic will scan the wrong time range, leading to false positives (incorrect alerts) or false negatives (missing actual data issues).
## 4. Conditions and Switch Tasks
Impact Point: These tasks evaluate logic based on upstream status or variables.
Consequence: If the logical expressions or "Global Variables" involved in the switch/condition rely on date-based calculations performed by the Master, the workflow may branch into the wrong path due to the timezone offset.
## 5. Sub-Process Tasks
Impact Point: Parent workflows often pass calculated date parameters down to sub-processes.
Consequence: If the parent workflow generates an incorrect date parameter due to the JVM timezone bias, the entire sub-process (and all its internal tasks) will inherit and operate on that incorrect business date.
## 6. Backfill / Complement Data Scenarios
Impact Point: During backfill operations, the system generates a series of schedule_time instances.
Consequence: If the internal logic for mapping these times to specific date strings depends on a faulty timezone conversion (especially for complex weekly or monthly offsets), the backfilled data will likely be inconsistent with the expected historical periods.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org