The MessageFormat class is cool because we can insert parameters and do formatting directly with it. This allows me to easily override the date format directly in message package properties files.
For instance:
MessageFormat.format("Test inserting a date param here: {0,date,dd/MM/yyyy HH'h'mm} -> OK cool", new Date() );
But what if I need to display the date in different time zones?
I know that I can format all dates before embedding them in my package, but it's a pain to format each displayed date ...
In work we use
org.springframework.context.support.ReloadableResourceBundleMessageSource
Perhaps I will try to override it and create my own MessageFormat, which will consider using a good time zone. But this may not fit our architecture well.
Do you see another alternative?