public static int dateToDays(Date d) {
    // convert to equivalent time in UTC, then get day offset
    long millisLocal = d.getTime();
    return millisToDays(millisLocal);
  }
@return time in seconds corresponding to this DateWritable
storage-api/src/java/org/apache/hadoop/hive/serde2/io/DateWritable.java