I am having an issue with date display in an JSF application say 31/12/2006 date is being displayed as 30/12/2006 while in DataBase it is stil 31/12/2006. what may be an issue? is it an issue related to MyFaces? I got a solution to set Environment variable: CATALINA_OPTS= -Duser.timezone = GMT while starting server (Tomcat5.0) but I can ask client to do this each time at the server start-up. So how to set up this var for Tomcat as well as JBoss because this variable solves the problem.
in the above code: policyBean.timezone is to set timezone to "GMT+10)" bcos in MyEclipse I don know how to set CATALINA_OPTS. its working fine but then while saving it to DataBase it is saving as 30/12/2006 instead of 31/12/2006.
This is a really irritating property of the JSF datetime converter. It defaults to translating to GMT and the only way to use a local timezone is to either explicitly code the timezone (instead of depending on user locale info) or to use one of the workarounds people have listed above.
An IDE is no substitute for an Intelligent Developer.