List of utility methods to do Date GMT Format
String | formatDateTimeGMT(Date date) format Date Time GMT return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG).format(date);
|
String | formatGMT(Date date) format GMT assert (date != null); SimpleDateFormat format = new SimpleDateFormat(DATE_TIME_PATTERN); format.setTimeZone(TIME_ZONE_GMT); return format.format(date); |
String | formatGMT(Date date, String parttern) format GMT if (date == null) { return ""; if (parttern == null || parttern.equals("")) { return ""; SimpleDateFormat formater = new SimpleDateFormat(parttern, Locale.ENGLISH); formater.setTimeZone(GMT); ... |
String | formatGmtDate(Date date) format Gmt Date SimpleDateFormat df = new SimpleDateFormat(GMT_DATE_FORMAT, Locale.US); df.setTimeZone(TimeZone.getTimeZone("GMT")); return df.format(date); |
String | formatGMTDate(Date gmtTime, int offset) format date to show in web pages, with default time format, since 2005/09/13 return formatGMTDate(gmtTime, DEFAULT_DATE_FORMAT, offset);
|
String | getDefaultID2GMT() default timezone to GMT return getGMTFormat(TimeZone.getDefault().getID());
|
String | getFormattedGMTDate(long timestamp) get Formatted GMT Date Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); cal.setTimeInMillis(timestamp); return formatter.format(cal.getTime()); |
SimpleDateFormat | getNewGmtSimpleDateFormat(String format) get New Gmt Simple Date Format return getNewGmtSimpleDateFormat(format, true);
|
String | getStringBaseGMT(Date date, String timezone) get String Base GMT return dateToString(getDateBaseGMT(date, timezone));
|
ThreadLocal | getThreadLocalGMTDateFormat(final String format) get Thread Local GMT Date Format return new ThreadLocal<SimpleDateFormat>() { @Override protected SimpleDateFormat initialValue() { return getGMTDateFormat(format); }; |