public static void setTimestamp(Timestamp t, byte[] bytes, int offset) {
    long seconds = getSeconds(bytes, offset);
    int nanos;
    if (hasDecimalOrSecondVInt(bytes[offset])) {
      nanos = getNanos(bytes, offset + 4);
    } else {
      nanos = 0;
    }
    t.setTimeInSeconds(seconds, nanos);
  }
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/TimestampWritableV2.java