List of utility methods to do UTC Date
GregorianCalendar | createUtcCalendar() create Utc Calendar return new GregorianCalendar(TimeZone.getTimeZone("UTC"), Locale.ENGLISH); |
String | formatUTC(Date time) Date-Time formater that corresponds to the standard UTC time as used in XML Calendar c = null; if (c == null) c = Calendar.getInstance(); c.setTime(time); return c.get(Calendar.YEAR) + "-" + formatInt2(c.get(Calendar.MONTH) + 1) + "-" + formatInt2(c.get(Calendar.DAY_OF_MONTH)) + "T" + formatInt2(c.get(Calendar.HOUR_OF_DAY)) + ":" + formatInt2(c.get(Calendar.MINUTE)) + ":" + formatInt2(c.get(Calendar.SECOND)) + "Z"; |
String | formatUTC(Date time) Date-Time formatter that corresponds to the standard UTC time as used in XML Calendar cal = Calendar.getInstance(); cal.setTime(time); StringBuffer buf = new StringBuffer(20); appendDate(buf, cal).append('T'); appendInt2(buf, cal.get(Calendar.HOUR_OF_DAY)).append(':'); appendInt2(buf, cal.get(Calendar.MINUTE)).append(':'); appendInt2(buf, cal.get(Calendar.SECOND)).append('Z'); return buf.toString(); ... |
Class> | getPlatypusConainerClass(Class> aLayoutClass) get Platypus Conainer Class return layoutClasses2PlatypusContainerClasses.get(aLayoutClass);
|
TimeZone | getUTC() get UTC return TimeZone.getTimeZone(TIME_ZONE_UTC);
|
String | getUTC(String beforeFormart, String afterFormart, String dateStr) get UTC SimpleDateFormat be = new SimpleDateFormat(beforeFormart, Locale.US); Date date = be.parse(dateStr); SimpleDateFormat af = new SimpleDateFormat(afterFormart, Locale.US); String dateUtc = af.format(date); return dateUtc; |
Calendar | getUTCCalendar() Retrieve an UTC Calendar. return Calendar.getInstance(UTC_TIME_ZONE);
|
Calendar | getUTCCalendar() get UTC Calendar if (utcCal == null) { utcCal = new GregorianCalendar(TimeZone.getTimeZone("UTC")); return utcCal; |
Calendar | getUTCCalendar(Calendar value) get UTC Calendar if (value == null) { return (null); Calendar cal = Calendar.getInstance(tzUTC); cal.setTimeInMillis(value.getTimeInMillis()); return (cal); |
Calendar | getUTCCalendarFromDialogString(String dateString) Convert a string date from a dialog date to a UTC calendar ready to be stored in the repository SimpleDateFormat sdf = (dateString.length() > YYYY_MM_DD.length()) ? new SimpleDateFormat(YYYY_MM_DD_T_HH_MM_SS) : new SimpleDateFormat(YYYY_MM_DD); return getUTCCalendarFromLocalDate(sdf.parse(dateString)); |