How do I tell the JVM to user a certain timezone.
Introduction.
It has been noted that on some Windows 2000 systems Integration Server fails to report the current system time. For example if the current time in Sydney/Australia is 3:00PM and the date/time region in Windows is set to GMT+10 JRE will report current time as 5AM or 4AM depending on daylight savings. It seems that the difference in the expected time and the time value reported by webMethods is the value of the GMT offset.
Work-around using a java system parameter.
The best solution to this problem would be to get the correct windows patches and ensure you are running the latest revision of the JDK version you are running. In cases where this is not possible then simply starting up the Integration Server and passing a System Parameter to the JDK to define the current timezone will fix the problem.
This means start up the JDK with the following system parameter:
If you know your way around IS you've probably already got the idea. For further instructions keep reading the next section.
Integrating the work-around with Integration Server.
Integration server is typically started up by a batch file, yes even if the server is running as a service.
Edit the batch file server.bat under IntegrationServer/bin directory and add the following line to define what the current timezone is:
set JAVA_TZ="Australia/Sydney"
This line creates a variable containing the values you want as your timezone.
set JAVA_TZSET=-Duser.timezone=%JAVA_TZ%
This line defines the switch which should be passed to the JDK to use a specified time zone. Note that you can set any system property in this way.
set JAVA_RUN=%JAVA_EXE% %JAVA_MEMSET% %JAVA_TZSET%
Now you will need to modify the line above to include the timezone system parameters when the JDK is started up.
Note: If the values provided for the system parameter are not recognised the server will not start up. In this case please refer to valid values for the JDK you are using.