Java Utililty Methods Timestamp from

List of utility methods to do Timestamp from

Description

The list of methods to do Timestamp from are organized into topic(s).

Method

TimestamptimestampFromLong(long t)
timestamp From Long
Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
cal.setTimeInMillis(t * 1000);
return new Timestamp(cal.getTime().getTime() - TimeZone.getDefault().getOffset(t * 1000));
java.sql.TimestamptimestampFromYearMonthDateHourMinuteSecondNanos(int year, int month, int date, int hour, int minute, int second, int nanos)
Answer a Timestamp with the year, month, day, hour, minute, second.
return new java.sql.Timestamp(year - 1900, month, date, hour, minute, second, nanos);