----- Original Message ----
> From: Tommy Pham <tommy...@yahoo.com>
> To: Struts Users Mailing List <user@struts.apache.org>
> Sent: Wednesday, September 30, 2009 9:06:47 AM
> Subject: Re: Localization and Dates
> 
> ----- Original Message ----
> > From: Robin Mannering 
> > To: Struts Users Mailing List 
> > Sent: Wednesday, September 30, 2009 2:18:58 AM
> > Subject: Localization and Dates
> > 
> > Hello,
> > 
> > Can anyone give me some 'best practice' advice for dealing with dates in
> > an international app (Struts2).
> > 
> > We are based in the UK and have an application running locally that
> > stores dates within action classes as java.util.Date.
> > 
> > These dates are sometimes passed to the application via querystring in
> > the format:
> > 
> > somePage.action?startDate=20/12/2009
> > 
> > The action class picks up this date and stores it correctly as the 20th
> > day of December when running locally.
> > 
> > However, on installation to our US based server (Struts 2 / Glassfish)
> > where of course date formats are mm/dd/yyyy, the action class makes the
> > assumption that we are trying to refer to the 20th month of the year and
> > so returns control to the input page with an accompanying error message.
> > 
> > I know this is to do with localization, but I am at a loss as to the
> > best practice for defining locales so that struts knows how to deal with
> > this kind of scenario.
> > 
> > The problem is passing those localized value back to the server action
> > classes.
> > 
> > Any advice would be gratefully received.
> > Thanks
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> 
> Locale + DateFormat / SimpleDateFormat / DateFormatSymbols ?

or http://struts.apache.org/2.1.6/docs/formatting-dates-and-numbers.html


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to