SpringSource/spring-framework — pull request #298 by beamerblvd (2013-06-05 06:43:30+00:00)
Title: Added TimeZone support to Spring i18n

Added support to Spring Framework i18n for use `TimeZone`s. This
support is based largely off the `Locale` support. The `TimeZoneResolver`
interface parallels the `LocaleResolver` interface and so do most of
its implementations. The `TimeZoneChangeInterceptor` mirrors the
`LocaleChangeInterceptor`. Use of the `TimeZoneContextHolder` is the same
as using the `LocaleContextHolder`, and the `RequestContext` and
`RequestContextUtils` classes have `TimeZone`-related methods that mirror
the `Locale`-related methods.

As it does with `LocaleResolver`, `DispatcherServlet` now exposes a
`TimeZoneResolver` and context. The `JstlUtils` take into account and
expose `TimeZone`s to the target JSP context, just like with `Locale`s,
so that `` and the like can take advantage of the
selected `TimeZone`. The Velocity and Jasper Report views have also
been updated to use the `TimeZone` (they were the only other view types
whose 3rd party libraries consumed `TimeZone`s but Spring was ignoring
that).

Everything was set up so that out-of-the-box, Spring and everything
it affects continue to use the System Default time zone without
configuration to the contrary. This way, behavior should not change
for users that don't set up `TimeZone` support.

This change includes 69 unit tests to back up my changes. I have also
thoroughly functionally tested the changes in my target application.
All new classes are well-documented with JavaDoc and the JavaDoc of
classes affected by these changes have been updated as appropriate.

Issue: SPR-1528