List of utility methods to do Timestamp Create
String | createEtag(String cookieId, Date timestamp) create Etag StringBuilder sb = new StringBuilder("\""); sb.append(cookieId); sb.append("/"); sb.append(fmt.format(timestamp)); sb.append("\""); return sb.toString(); |
String | createTimeStamp() Creates an auto ingest time stamp suffix using the current time. return dateFormat.format(Calendar.getInstance().getTime());
|
String | createTimestamp() Returns current timestamp as xs:Date format. Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); String formattedDate = sdf.format(date); return formattedDate; |
String | createTimeStamp() Creates a timestamp string SimpleDateFormat fmt = new SimpleDateFormat("yyyy_MM_dd_HH_mm_ss"); Date date = new Date(System.currentTimeMillis()); return fmt.format(date); |
String | createTimeStamp() create Time Stamp long millisSince1970 = System.currentTimeMillis(); return getFormattedTimeStamp(millisSince1970); |
Timestamp | createTimestamp(final int aYear, final int aMonth, final int aDate, final int aHour, final int aMinute, final int aSecond) create Timestamp Calendar c = Calendar.getInstance(); c.set(aYear, aMonth, aDate, aHour, aMinute, aSecond); return new Timestamp(c.getTimeInMillis()); |
Timestamp | createTimestamp(final int year, final int month, final int day, final int hour, final int minute, final int second) create Timestamp return new Timestamp(createCalendar(year, month, day, hour, minute, second).getTimeInMillis()); |
Timestamp | createTimestamp(int month, int day) create Timestamp Calendar c = Calendar.getInstance(); c.set(c.get(Calendar.YEAR), month - 1, day, 0, 0, 0); c.set(Calendar.MILLISECOND, 0); return new Timestamp(c.getTimeInMillis()); |
String | createTimestampedZipFilename(String prefix) create Timestamped Zip Filename StringBuilder sb = new StringBuilder(prefix); sb.append("-"); sb.append(DATE_FORMATTER.get().format(new Date())); sb.append(".zip"); return sb.toString(); |
SimpleDateFormat | createTimestampFormat() create Timestamp Format SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("UTC")); calendar.setGregorianChange(new Date(Long.MIN_VALUE)); sdf.setCalendar(calendar); return sdf; |