camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.08k stars 1.54k forks source link

fix(engine/webapps/engine-rest/clients): tests fails when build runs on UTC timezone #4219

Closed prajwolbhandari1 closed 5 months ago

prajwolbhandari1 commented 5 months ago

The bug is they used Epoch millisecond based on CET instead of UTC timezone. There are other places that its being used but aren't affecting tests. I just fixed the failed ones. I used GregorianCalendar Calendar instead of Julian since its widely used to create Date and also I think its more readable than that putting an Epoch millisecond.

The fix should work on any timezone that the tests are being run Example to run engine (other modules can be run the same way) tests in a specific timezone from a root folder: mvn clean install -pl engine Duser.timezone=UTC mvn clean install -pl engine -Duser.timezone=MST

-Duser.timezone --> sets VM time which takes precedence over OS time.

https://github.com/camunda/camunda-bpm-platform/issues/2604

yanavasileva commented 5 months ago

Hi @prajwolbhandari1 ,

Thank you for raising this. We will have a look at it and get back to you.

Best, Yana

prajwolbhandari1 commented 5 months ago

@yanavasileva did you get chance to take a look at it?

yanavasileva commented 5 months ago

I triggered our CI to double check for failures. I will get back to you in the next days.