cancel
Showing results for 
Search instead for 
Did you mean: 

Day light savings issue

sharat
Champ in-the-making
Champ in-the-making
Hello Support,

we have the issue with the daylight savings when Business process is scheduled to run.
For e.g : our server is setup in the UTC time and we have scheduled a business process to run at 9:25 EST (UTC -4 )(0 25 13 ? * MON,TUE,WED,THU,FRI *) and after the the day light savings the business process started to execute at 8:25 EST(UTC -5) as the repeat has been set in the UTC time.

How to make it to run at 9:25 AM every day irrespective of the Daylight savings.

Any help is greatly appreciated at the earliest would be great help.
Sharat
8 REPLIES 8

sharat
Champ in-the-making
Champ in-the-making
Sorry ** that is 9:25 EDT (Eastern Daylight savings New York/USA)

trademak
Star Contributor
Star Contributor
Good point, can you create a JIRA for this? I don't think we have a good solution for this yet.

Best regards,

sharat
Champ in-the-making
Champ in-the-making
Thanks Tijs for the quick response.
link for the jira bug : http://jira.codehaus.org/browse/ACT-1836

Earliest response is greatly appreciated.

mseiden
Champ in-the-making
Champ in-the-making
Hi Tijs,

I'm working with Sharat on resolving this issue and here is what I am thinking of doing.

First I'll subclass CycleBusinessCalendar and override resolveDuedate. The new resolveDuedate will look for a timezone string at the end of the cron or iso string. This string will be a java timezone ID: http://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html

R/2013-10-01T20:30:00/P1D DSTZONE:US/Eastern

0 30 20 ? * MON,TUE,WED,THU,FRI * START:2013-10-01T20:30:00 DSTZONE:US/Eastern

Now we have the start date for each in server time (UTC) and we have the timezone which will be used to calculate daylight savings. We pass the standard cron/iso string to super.resolveDuedate then adjust the time according to start and zone. Any string which does not contain these values will be calculated in the old way to maintain backwards compatibility.

Next I'll populate my own MapBusinessCalendarManager with a standard DurationBusinessCalendar and DueDateBusinessCalendar along with the new CycleBusinessCalendar subclass. This calendar manager will be used in the configuration of the process engine.

Of course I would prefer an official solution as this will break compatibility with standard Activiti. Any input would be greatly appreciated.

-Mark

trademak
Star Contributor
Star Contributor
Hi Mark,

That looks like a decent solution to be included in Activiti. Could you create a pull request for this?
So changing the CycleBusinessCalendar class to support timezones.

Best regards,

mseiden
Champ in-the-making
Champ in-the-making

aseem
Champ in-the-making
Champ in-the-making
Is there a plan to include this in the next release?

aseem
Champ in-the-making
Champ in-the-making
Sorry, I just realized that it was a part of 5.15 release, although the JIRA still says its Unresolved, so got confused.