List of utility methods to do Timestamp
Timestamp | normalizeDateTimeAsTimestamp(Date changedDate, Locale locale) normalize Date Time As Timestamp return new Timestamp(normalizeDateTime(changedDate, locale).getTime()); |
Timestamp | nowAsTimestamp() Get now time as timestamp return new Timestamp(nowAsLong()); |
Timestamp | nowUtcTimestamp() now Utc Timestamp return Timestamp.valueOf(nowUtc());
|
Timestamp | objToTimeStamp(Object obj) obj To Time Stamp Timestamp tt = null; if (obj != null) { tt = (Timestamp) obj; return tt; |
String | printFull(Timestamp ts) print Full return DATE_TIME_FORMATTER_FULL.print(ts.getTime());
|
String | quoteMySQLDataField(Timestamp fieldData) quote My SQL Data Field String strResult = ""; if (fieldData != null) strResult = "\"" + fieldData + "\""; else strResult = "null"; return strResult; |
Timestamp | randomTimestamp() random Timestamp return new Timestamp(new Date().getTime()); |
Timestamp | readTimestamp(ByteBuffer logBuf) Read a timestamp from the log. long millis = readLong(logBuf); return new Timestamp(millis); |
Timestamp | readTimestamp(DataInput in) Reads a Timestamp value. if (readNullFlag(in)) return null; return new Timestamp(in.readLong()); |
Timestamp | readTimestamp(ObjectInput in, long nullFlag) read Timestamp Timestamp stamp = null; long value = in.readLong(); if (value != nullFlag) { stamp = new Timestamp(value); return stamp; |