List of usage examples for org.apache.commons.lang.time FastDateFormat getDateTimeInstance
public static synchronized FastDateFormat getDateTimeInstance(int dateStyle, int timeStyle, TimeZone timeZone, Locale locale)
Gets a date/time formatter instance using the specified style, time zone and locale.
From source file:com.liferay.portal.util.FastDateFormatFactoryImpl.java
public Format getDateTime(int dateStyle, int timeStyle, Locale locale, TimeZone timeZone) { ///////////// Start of modifications ///////////// locale = PlatformLocaleUtil.get().getAdminLocale(locale); ///////////// End of modifications ///////////// String key = getKey(dateStyle, timeStyle, locale, timeZone); Format format = _dateTimeFormats.get(key); if (format == null) { format = FastDateFormat.getDateTimeInstance(dateStyle, timeStyle, timeZone, locale); _dateTimeFormats.put(key, format); }/*w w w. j a v a2 s . c o m*/ return format; }