When a workflow processinstance / taskinstance is created, the time written to the database is not UTC but the timezone of the server. The endpoints (e.g. /openidm/workflow/processinstance?_queryId=filtered-query) returns the same time value but interpret the time as UTC.
- Create a workflow at 2018-10-12 2PM local time in Germany (UTC+2)
- Time is written to the database as '2018-10-12 14:00:00.000' (so in local time)
- When requesting the processinstance the time is incorrectly interpreted as UTC: 2018-10-12T14:00:00.000+*Z+*
- IDM then converts the time back to the German timezone as 2018-10-12 4PM which causes confusion to the end-users as the completion time of a finished task is shown as 2 hours in the future.
- Use the sample workflow https://backstage.forgerock.com/docs/idm/6/integrators-guide/#testing-workflow-integration
- Create a processinstance and then retrieve it:
Note that this returns the time in UTC, for example with endTime:
Checking the Activiti tables in the DB (MySQL in this test case):
...this is the server system time.