MessageFormat class is cool because we can insert parameters and do the formatting directly with it. This permits me to be able to easily override a date format directly in a message bundle properties files.
For exemple:
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 timezones?
I know i can format all dates before injecting them in my bundle, but this is a pain to format every date displayed...
At work we are using
org.springframework.context.support.ReloadableResourceBundleMessageSource
I can probably try to override it and create my own MessageFormat that would consider using the good timezone. But it may not fit well for our architecture.
Do you see any other alternative?