public static Timestamp longToTimestamp(long time, boolean intToTimestampInSeconds) {
      // If the time is in seconds, converts it to milliseconds first.
      return new Timestamp(intToTimestampInSeconds ?  time * 1000 : time);
  }
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