grib/src/main/java/ucar/nc2/grib/grib2/Grib2Pds.java
protected CalendarDate calcTime(int startIndex) {

    int year = GribNumbers.int2(getOctet(startIndex++), getOctet(startIndex++));
    int month = getOctet(startIndex++);
    int day = getOctet(startIndex++);
    int hour = getOctet(startIndex++);
    int minute = getOctet(startIndex++);
    int second = getOctet(startIndex++);

    if ((year == 0) && (month == 0) && (day == 0) && (hour == 0) && (minute == 0) && (second == 0))
      return CalendarDate.UNKNOWN;

   // href.t00z.prob.f36.grib2
     if (hour > 23) {
       day += (hour/24);
       hour = hour % 24;
     }

    return CalendarDate.of(null, year, month, day, hour, minute, second);
  }
protected CalendarDate calcTime(int startIndex) {

    int year = GribNumbers.int2(getOctet(startIndex++), getOctet(startIndex++));
    int month = getOctet(startIndex++);
    int day = getOctet(startIndex++);
    int hour = getOctet(startIndex++);
    int minute = getOctet(startIndex++);
    int second = getOctet(startIndex++);

    if ((year == 0) && (month == 0) && (day == 0) && (hour == 0) && (minute == 0) && (second == 0))
      return CalendarDate.UNKNOWN;

   // href.t00z.prob.f36.grib2
     if (hour > 23) {
       day += (hour/24);
       hour = hour % 24;
     }

    return CalendarDate.of(null, year, month, day, hour, minute, second);
  }
null means use refTime