I am facing a problem while using Russian locale, Time Zone part of the date is not converting to Russian.
i.e. if “Aug 10, 2010 4:02:09 PM Yakutsk Time” is the time,
it is converting to –
With Russian locale – “10.08.2010 16:02:09 Yakutsk Time 10”
With French Locale – “août 2010 16:02:09 Heure du Iakoutsk”
I am using following code (Russian locale is supported on my server)
SimpleDateFormat formatterWithoutTimezone = new SimpleDateFormat(
"dd-MMM-yyyy HH:mm:ss");
SimpleDateFormat formatterServerTimezone = new SimpleDateFormat(
"dd-MMM-yyyy HH:mm:ss zzz");
TimeZone serverTimezone = TimeZone.getDefault();
formatterServerTimezone.setTimeZone(serverTimezone);
String dateSrcStr = formatterWithoutTimezone.format(dateSrc) + " UTC";
Date dateServerTimezone = formatterServerTimezone.parse(dateSrcStr);
DateFormat displayFormatter = DateFormat.getDateTimeInstance( DateFormat.MEDIUM, DateFormat.MEDIUM, locale);
String formatedDate = displayFormatter.format(dateServerTimezone) + " "
+ serverTimezone.getDisplayName(locale);
Time Zone names are obtained by Java from the sun.util.resources.TimeZoneNamesBundle. There is a TimeZoneNames base resource class and there are localizations (see in rt.jar):
So only the above languages have the localized Time Zone names. The following test confirms that most of the locales do not have localized time zone names: