public void set(int days, int hours, int minutes, int seconds, int nanos) {
    long totalSeconds = seconds;
    totalSeconds += TimeUnit.DAYS.toSeconds(days);
    totalSeconds += TimeUnit.HOURS.toSeconds(hours);
    totalSeconds += TimeUnit.MINUTES.toSeconds(minutes);
    totalSeconds += TimeUnit.NANOSECONDS.toSeconds(nanos);
    nanos = nanos % IntervalDayTimeUtils.NANOS_PER_SEC;

    this.totalSeconds = totalSeconds;
    this.nanos = nanos;

    normalizeSecondsAndNanos();
  }
Ensures that the seconds and nanoseconds fields have consistent sign
storage-api/src/java/org/apache/hadoop/hive/common/type/HiveIntervalDayTime.java