[ https://issues.apache.org/jira/browse/OFBIZ-12864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17782017#comment-17782017 ]
ASF subversion and git services commented on OFBIZ-12864: --------------------------------------------------------- Commit 46701da3c3cffa5b4b3adea384050efb7b6179ef in ofbiz-framework's branch refs/heads/trunk from Deepak Dixit [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=46701da3c3 ] Fixed Issue with OFBiz Job Scheduler and Daylight Saving Time (OFBIZ-12864) (#674) * Fixed recurring job not scheduling when DST change The issue occurs when DST changes, and OFBiz fails to schedule recurring jobs properly. This is due to a condition in the PersistedServiceJob.createRecurrence method where it compares the next scheduled time (next) with the start time (startTime) for the job. To address the issue, adding a new field named JobSandbox.runTimeEpoch. This field would store the UTC format epoch milliseconds of the runtime date. When scheduling or rescheduling recurring jobs, the system would use the UTC epoch stored in JobSandbox.runTimeEpoch for comparison. This solution ensures that the system uses a consistent, UTC-based time for scheduling and rescheduling recurring jobs, even when DST changes affect the local time. To implement this solution, you would need to: Modify the PersistedServiceJob.createRecurrence method to calculate and store the UTC epoch milliseconds in the JobSandbox.runTimeEpoch field. Update the code responsible for polling and rescheduling jobs to use the JobSandbox.runTimeEpoch field when it is set. If the field is not set, you would fall back to getting the runtime date to filter the jobs. By using this approach, system should be able to handle recurring job scheduling more reliably, especially when DST changes are involved, as it ensures that all time comparisons are made in a consistent UTC format. * Checkstyle fixes * Store the runTimeEpoch while recurring job scheduling > Issue with OFBiz Job Scheduler and Daylight Saving Time > ------------------------------------------------------- > > Key: OFBIZ-12864 > URL: https://issues.apache.org/jira/browse/OFBIZ-12864 > Project: OFBiz > Issue Type: Bug > Components: framework/service > Affects Versions: 22.01.01, Upcoming Branch, 18.12.08 > Reporter: Deepak Dixit > Assignee: Deepak Dixit > Priority: Major > > The issue occurs when DST changes, and OFBiz fails to schedule recurring jobs > properly. > > This is due to a condition in the PersistedServiceJob.createRecurrence method > where it compares the next scheduled time (next) with the start time > (startTime) for the job. > -- This message was sent by Atlassian Jira (v8.20.10#820010)