From: http://developer.android.com/reference/java/util/Locale.html
*"Note that locale data is not necessarily available for any of the locales pre-defined as constants in this class except for en_US, which is the only locale Java guarantees is always available.* *It is also a mistake to assume that all devices have the same locales available. A device sold in the US will almost certainly support en_US and es_US, but not necessarily any locales with the same language but different countries (such as en_GB or es_ES), nor any locales for other languages (such as de_DE). The opposite may well be true for a device sold in Europe." * It might be that the devices you are testing on does not support the Locale. Can you enumerate the installed Locales or test to see if the Locale you want is installed? On Tuesday, July 3, 2012 4:25:38 PM UTC+1, elin wrote: > > Please help me with this date time localization issue. I am trying to use > Java.Text.DateFormat to get the default date format for different locale in > the following. > > dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT, Locale.UK); > String formattedDateString = dateFormatter.format(new > Date(System.currentTimeMillis())); > > When I am trying to format the date using en-GB locale for the date > - July, 3rd, 2012 > > Android 2.2.x.-2.3.x result: 03/07/2012 (Correct) > Android 4.0.x result: 07/03/2012 (Wrong) > > Apparently, It is working at Android platform 2.2.x to 2.3.x, but in > devices with 4.0.x (such as ASUS Eee Pad and Samsung Nexus 2), it does not > work anymore. Why is this behavior different between the API level? And how > can I get the default date format for specific locale from now on? > > Thanks, > > Edward > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

