Gradlew vs mvn timezone

Viewed 113

I got a Docker container by default in UTC Timezone (gitlab runner)

When i start my tests in the container with "mvn" then jvm uses UTC timezone, but when i start the same tests with "gradelw" then jvm uses the host machine TimeZone.

Is there any difference between mvn and gradlew how they start jvm timezone point of view?

1 Answers

There should be a setting somewhere in your pom.xml or the way how you run it. Actually, there could be a lot of ways it works in UTC in Maven.

Try running Gradle with the user.timezone property: ./gradlew test -Duser.timezone=GMT. That is probably the easiest way to validate the setup.

Related