Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 23175 invoked from network); 30 Sep 2009 16:10:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Sep 2009 16:10:47 -0000 Received: (qmail 67042 invoked by uid 500); 30 Sep 2009 16:10:44 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 66990 invoked by uid 500); 30 Sep 2009 16:10:44 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 66980 invoked by uid 99); 30 Sep 2009 16:10:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Sep 2009 16:10:44 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.191.124.147] (HELO web38204.mail.mud.yahoo.com) (209.191.124.147) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 30 Sep 2009 16:10:34 +0000 Received: (qmail 57251 invoked by uid 60001); 30 Sep 2009 16:10:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1254327012; bh=u6a8Qoqkg2fdbL9WxB8Pbpde8l4w+ZNJ1URvfkZg8Eo=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=0z72gt50dP0E4rHudCMPsjo3GXogqO0N7AFQdLUJP8zpgc8OA+N/itZuZkO7FuVd8ZmYN+yW+JdtL2yPctyD1OKWGdJPlpO0L0dyWFdwmW52fJJz+CvWk11saBgER8yjdILPk6ijyqmoramHunMTFlZqnh0lMnmX0Gx7TKub3CY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=2omDArIj/55ByM9JfZNwXXdzqDHaCnRMgeJYCK564W286UKxVArmlAeqZdcev3VFkMO8vgRZaGiEGBMKSt91iefLRfIl/vgxbZmswi7iQ2XDE7ByPeCBpHaWaFAsJi47bXYFrAO+YUQ51luywvRYlgDG1cMb+JrY7fAVwso20CY=; Message-ID: <134105.56465.qm@web38204.mail.mud.yahoo.com> X-YMail-OSG: AQFHhoIVM1nXzFdnGy.266PfreyhfOST.A3tBIHQ4GBv2USOxNYIYqSn5idQb2jjQHNf5ULzCxAP8Hr2Wrx5v3BvR1ouHvoKOtv8RBzqmsRix8lpsP8Y0eG25e8MWIEl3sbNH5yFr9mC77smsTrYqYQBLX6JCNXH5GBEbGw4b4Dgl5SalRiNsHeuFKFI.Xy2hYwaKV.HkoY60MiEh4hkcN6t3ON46wejy9GFXTdHE5RB3oTihK3K1vMTveLqprzIdEtCqpdc1FzPRvv5V.0XeqYhE9XA9vS6RNFCfBkB1X4XWuMjAJmcdGwPi32OQuK44PuX4LOtH4uW0AAIl3oKbY1YiJ7sxUDb48N94L_3dxzHxA0CoFV_DW8- Received: from [98.119.209.49] by web38204.mail.mud.yahoo.com via HTTP; Wed, 30 Sep 2009 09:10:12 PDT X-Mailer: YahooMailRC/157.18 YahooMailWebService/0.7.347.3 Date: Wed, 30 Sep 2009 09:10:12 -0700 (PDT) From: Tommy Pham Subject: Re: Localization and Dates To: Struts Users Mailing List MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org ----- Original Message ---- > From: Tommy Pham > To: Struts Users Mailing List > 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-unsubscribe@struts.apache.org > > For additional commands, e-mail: user-help@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-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org