0

I want to change the server running timezone. So I want to add timezone option in JAVA_OPTS. (-Duser.timezone=GMT). I have tried to edit '/var/lib/openshift/548c33cce0b8cd44d3000083/jbossas/bin/standalone.conf' in JBoss cartridge of openshift, but failed because of Permission denied.

I have referred one solution mentioned in https://forums.openshift.com/how-to-pass-jvm-options-to-jboss-7as. That is to add "export JAVA_OPTS="$JAVA_OPTS -Duser.timezone=GMT" in 'pre_start_jbossas' file in action_hooks folder and push it. I did the same and it is working fine. The timezone options is correctly added in java_opts at the time of server start up.

Problem here is, at the time of cartridge restart, the timezone option is not present in Java_Opts. Please provide some solution.

Ragubathy
  • 23
  • 8

1 Answers1

1

Use JAVA_OPTS_EXT instead. Remember to put trailing and leading spaces, like:

export JAVA_OPTS_EXT=" -Duser.timezone=GMT "
ptrk
  • 1,800
  • 1
  • 15
  • 24