In my application, I'm allowing users to change the timezone used to display Date's to suit their needs, and I'd like to have the JVM run with GMT timezone to preserve my sanity and portability. Some googling led me to an old blog post of Matt's on the subject:
http://raibledesigns.com/rd/entry/change_tomcat_s_timezone and I was able to use the same trick in my mvn.bat file set MAVEN_OPTS=-Duser.timezone=GMT to get 'mvn jetty:run-war' to run with GMT. My question: is there a way to do this programmatically so that I don't have to worry about the environment variables in each developer's setup and test and production? Timezone.setDefault() only operates on the current thread http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6181786 and using appfuse 2.0/spring mvc/hibernate, it's not clear to me if it's possible to set that early enough in the startup to have the value propagate to all threads, much less in a way that portable between tomcat/jetty/etc. Any hints? -- View this message in context: http://www.nabble.com/setting-JVM-timezone-without--Duser.timezone-environment-vars-tf4735703s2369.html#a13542582 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
