code: public int getOffset(int era, int year, int month,int dom, int dow, int millis, int monthLength){
  
          if ((era != GregorianCalendar.AD && era != GregorianCalendar.BC)
              || month < Calendar.JANUARY
              || month > Calendar.DECEMBER
              || dom < 1
              || dom > monthLength
              || dow < Calendar.SUNDAY
              || dow > Calendar.SATURDAY
              || millis < 0
              || millis >= Grego.MILLIS_PER_DAY
              || monthLength < 28
              || monthLength > 31) {
              throw new IllegalArgumentException();
          }
  
          if (era == GregorianCalendar.BC) {
              year = -year;
          }
  
          if (finalZone != null && year >= finalStartYear) {
              return finalZone.getOffset(era, year, month, dom, dow, millis);
          }
  
          // Compute local epoch millis from input fields
          long time = Grego.fieldsToDay(year, month, dom) * Grego.MILLIS_PER_DAY + millis;
  
          int[] offsets = new int[2];
          getHistoricalOffset(time, true, LOCAL_DST, LOCAL_STD, offsets);
          return offsets[0] + offsets[1];
      }
docs: TimeZone API.