cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply a timezone to ISO8601 strings for Timers

zlatan316
Champ on-the-rise
Champ on-the-rise
I would like to make use of timezones in the ISO8601 strings used for Timer objects. This is to stop us converting timezones to the one used by the JVM(Which i believe is the one Activiti uses for its dates and times).

How can I use an ISO8601 string with timezone which can then be evaluated by an Activiti timer?
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Which kind of timer are you referring to here? A due date, duration or time cycle definition?
In the due date logic we currently use DateTime.parse(dueDateString).toDate() to resolve the due date.
Is that not working for you? Could you share a unit test showing the issue?

Best regards,

zlatan316
Champ on-the-rise
Champ on-the-rise
I would need to for the Due Date, where I would like to pass an ISO8601 String  such as 2016-03-04T10:00:00 but with a timezone attached. I'm handling the format of the string using a SimpleDateFormat instance of "yyyy-MM-dd'T'HH:mm:ss".

jbarrez
Star Contributor
Star Contributor
Not 100% following: are we talking here about the activiti:dueDate construct or the .setDueDate() api call?

zlatan316
Champ on-the-rise
Champ on-the-rise
This is for the activiti:dueDate construct.

jbarrez
Star Contributor
Star Contributor
ok, so the duedate is parsed here: https://github.com/Activiti/Activiti/blob/master/modules/activiti-engine/src/main/java/org/activiti/...

Which delegates to https://github.com/Activiti/Activiti/blob/master/modules/activiti-engine/src/main/java/org/activiti/...

which uses JodaTime's parsing :

return DateTime.parse(duedate).toDate();

and should be ISO8601 compliant …
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.