You would have to set the default Locale of the JRE.
Either call Locale.setDefault(Locale.US) (class java.util.Locale) before you parse any
dates, or launch java with the user.country property set to US.
For more than you'd ever want to know about Locales, see this:
http://java.sun.com/docs/books/tutorial/i18n/locale/index.html
--- On Wed, 4/1/09, Zeke <xanadu860122(a)gmail.com> wrote:
From: Zeke <xanadu860122(a)gmail.com>
Subject: [rules-users] Date format [MMM-dd-yyyy] can NOT work in Chinese environment. How
to set locale or language of drools?
To: "rules-users" <rules-users(a)lists.jboss.org>
Date: Wednesday, April 1, 2009, 11:11 AM
Hi, Friends:
I am using Drools 4.0.7. I set the date format as
[MMM-dd-yyyy], My
machine locale is China, and the language is Chinese. I
find that if I have
a rule like "when date > Jan-01-2009", drools
will throw exception like
"Jan-01-2009 does not follow [MMM-dd-yyyy]". But
if I change "Jan" to
Chinese charactor which is "一月", runtime
will be OK. So I think it is a
locale/language issue.
Is there anyway to set locale/language of drools? That is
even if my
environment is Chinese, I still can use the English date
format? Or is there
any other way can help me out?
Thanks
- Zeke
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users