I'm using f:convertDateTime to format a dateTime in a datatable. I set the following context parameter in web.xml to explicitly set the timezone to system timezone:
<context-param>
<param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
<param-value>true</param-value>
</context-param>
For some reason my convertDateTime gets "GMT" always, but the correct timezone is "GMT-03:00". I tried this in a test class to see my timezone:
System.out.println(TimeZone.getDefault().getDisplayName());
which gives me "GMT-03:00".
I'm using JSF 1.2 and JBoss Seam 2.2, the jboss-seam DateTimeConverter is called to make this conversion, I don't know if this is the problem.
The mentioned context param is introduced in JSF 2.0. It's not available in JSF 1.x. See also a.o. Set a default time zone for f:convertDateTime. In other words, it's simply never used. Remove it to avoid confusion.
You've 2 options:
Explicitly specify
timeZone
in every<f:convertDateTime>
.If necessary as application scoped bean property.
Extend the date time converter with a new default time zone (and other properties).
And then replace
<f:convertDateTime>
with it.