theideabulb
asked on
Timezone setting wrong on CF9 Server
I need to set the timezone in the jvm arguments to EST. How can i do that? I have been reading about setting the -Duser.timezone. I am not sure how to set it
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can pass the JVM this param -Duser.timezone, for example -Duser.timezone="Europe/So fia" and this should do the trick. Setting the environment variable TZ might also help
use the JDK DST Timezone Update Tool - 1.3.25 (tzupdater) and then change the JVM parameter,the timezone information is stored by Windows in some registry
use the JDK DST Timezone Update Tool - 1.3.25 (tzupdater) and then change the JVM parameter,the timezone information is stored by Windows in some registry
For example if you wanted to use PST, find the jvm.config file. Append "-Duser.timezone=America/L os_Angeles " to the beginning of the jvm args. Then restart CF.
To confirm the time zone was applied using:
Results:
America/Los_Angeles
(current date and time)
# Arguments to VM
java.args=-server -Xmx512m -Duser.timezone=America/Los_Angeles -Dsun.io.useCanonCaches=false (... rest of arguments ...)
To confirm the time zone was applied using:
<cfset tz = createObject("java", "java.lang.System").getProperty("user.timezone") >
<cfdump var="#tz#">
<cfdump var="#now()#">
Results:
America/Los_Angeles
(current date and time)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That did it.. Thanks!
Select the server for which you want to set the time zone value from the list of scope options.
Set a value for the TZ variable.
If the TZ variable is included in the list of defined variables, click TZ, and then specify a new time zone value in the Value field.
If the TZ variable is not included in the list of defined variables, click New, and then specify TZ in the Name field, and the appropriate time zone value in the Value field.
For example, if you specify TZ in the Name field, and EST5EDT in the Value field, Eastern Daylight Savings is used as the time zone setting for all of your server processes.
Click Apply, and then click Save to save your changes.
Stop and restart all of the affected application server that were running when you made the time zone changes.