public static void setTimestamp(Timestamp t, byte[] bytes, int offset) {
    long seconds = getSeconds(bytes, offset);
    t.setTime(seconds * 1000);
    if (hasDecimalOrSecondVInt(bytes[offset])) {
      t.setNanos(getNanos(bytes, offset + 4));
    } else {
      t.setNanos(0);
    }
  }
Converts the time in seconds or milliseconds to a timestamp.
@param time time in seconds or in milliseconds
@return the timestamp
serde/src/java/org/apache/hadoop/hive/serde2/io/TimestampWritable.java