List of usage examples for org.apache.commons.lang3.time FastDateFormat getDateTimeInstance
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final TimeZone timeZone)
Gets a date/time formatter instance using the specified style and time zone in the default locale.
From source file:org.apache.openmeetings.web.app.WebSession.java
private void setUser(User u, Set<Right> rights) { String _sid = SID;/*from w ww.j av a 2 s . c o m*/ Long _recordingId = recordingId; Long _roomId = roomId; Invitation _i = i; replaceSession(); // required to prevent session fixation if (_sid != null) { SID = _sid; } if (_recordingId != null) { recordingId = _recordingId; } if (_roomId != null) { roomId = _roomId; } if (i != null) { i = _i; } userId = u.getId(); if (rights == null || rights.isEmpty()) { this.rights = Collections.unmodifiableSet(u.getRights()); } else { this.rights = Collections.unmodifiableSet(rights); } languageId = u.getLanguageId(); externalType = u.getExternalType(); tz = getBean(TimezoneUtil.class).getTimeZone(u); ISO8601FORMAT = FastDateFormat.getInstance(ISO8601_FORMAT_STRING, tz); setLocale(languageId == 3 ? Locale.GERMANY : LabelDao.languages.get(languageId)); //FIXMW locale need to be set by User language first sdf = FastDateFormat.getDateTimeInstance(SHORT, SHORT, getLocale()); }
From source file:org.apache.openmeetings.web.util.DateLabel.java
private void initFmt() { fmt = FastDateFormat.getDateTimeInstance(MEDIUM, MEDIUM, getLocale()); }
From source file:org.apache.syncope.client.console.SyncopeConsoleSession.java
public FastDateFormat getDateFormat() { Locale locale = getLocale() == null ? Locale.ENGLISH : getLocale(); return FastDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale); }