DateTimeUtils { static public SimpleDateFormat getNewGmtSimpleDateFormat(String format) { return getNewGmtSimpleDateFormat(format, true); } private  DateTimeUtils(); static String timestampToHumanDateAndTimeLocal(long timestamp); static String timestampToHumanDateAndTimeAde(long timestamp); static String timestampToHumanDateAndTimeUTC(long timestamp); static String millisecondsToHumanTime(long period); static String millisecondsToDecimalHumanTime(long period); static long getDayStartTimeLocal(long startTime); static String timestampToHumanDateAndTimeAndStampLocal(long time); static String timestampToHumanDateAndTimeAndStampUTC(long time); static long getTimeStampLocal(int year, int month, int day, double frac); static Date getCurrentDate(); static TimeZone parseTimeZone(String id); static SimpleDateFormat getNewGmtSimpleDateFormat(String format); static SimpleDateFormat getNewGmtSimpleDateFormat(String format, boolean lenient); static Calendar getGmtGregorianCalendar(); static Calendar getGmtGregorianCalendar(int year, int month, int dayOfMonth); static long parseDuration(String strDuration); static final long SECONDS_IN_MINUTE; static final long MINUTES_IN_HOUR; static final long HOURS_IN_DAY; static final long DAYS_IN_WEEK; static final long MILLIS_IN_SECOND; static final long HALF_MILLIS_IN_SECOND; static final long MILLIS_IN_MINUTE; static final long MILLIS_IN_HOUR; static final long MILLIS_IN_DAY; static final long MILLIS_IN_WEEK; static final TimeZone GMT_TIMEZONE; static final LazyObj<TimeZone> ADE_TIMEZONE; }
@Test public void testGetNewGmtSimpleDateFormat(){ SimpleDateFormat sdf = new SimpleDateFormat("1"); sdf.setTimeZone(TimeZone.getTimeZone("GMT")); sdf.setLenient(true); assertEquals("testGMT",sdf, DateTimeUtils.getNewGmtSimpleDateFormat("1")); }