16.4. Timezones
There is also a session-scoped instance of
java.util.Timezone
, named org.jboss.seam.international.timezone
, and a Seam component for changing the timezone named org.jboss.seam.international.timezoneSelector
. By default, the timezone is the default timezone of the server. Unfortunately, the JSF specification assumes all dates and times are UTC, and displayed as UTC, unless a different timezone is explicitly specified with <f:convertDateTime>
.
Seam overrides this behavior, and defaults all dates and times to the Seam timezone. In addition, Seam provides the
<s:convertDateTime>
tag, which always performs conversions in the Seam timezone.
Seam also provides a default date converter to convert a string value to a date. This saves you from having to specify a converter on input fields that capture dates. The pattern is selected according to the user's locale and the time zone is selected as described above.