code: private TimeZoneRule findRuleInFinal(long time, boolean local, int NonExistingTimeOpt, int DuplicatedTimeOpt) {
          if (finalRules == null || finalRules.length != 2 || finalRules[0] == null || finalRules[1] == null) {
              return null;
          }
  
          Date start0, start1;
          long base;
          int localDelta;
  
          base = time;
          if (local) {
              localDelta = getLocalDelta(finalRules[1].getRawOffset(), finalRules[1].getDSTSavings(),
                      finalRules[0].getRawOffset(), finalRules[0].getDSTSavings(),
                      NonExistingTimeOpt, DuplicatedTimeOpt);
              base -= localDelta;
          }
          start0 = finalRules[0].getPreviousStart(base, finalRules[1].getRawOffset(), finalRules[1].getDSTSavings(), true);
  
          base = time;
          if (local) {
              localDelta = getLocalDelta(finalRules[0].getRawOffset(), finalRules[0].getDSTSavings(),
                      finalRules[1].getRawOffset(), finalRules[1].getDSTSavings(),
                      NonExistingTimeOpt, DuplicatedTimeOpt);
              base -= localDelta;
          }
          start1 = finalRules[1].getPreviousStart(base, finalRules[0].getRawOffset(), finalRules[0].getDSTSavings(), true);
  
          if (start0 == null || start1 == null) {
              if (start0 != null) {
                  return finalRules[0];
              } else if (start1 != null) {
                  return finalRules[1];
              }
              // Both rules take effect after the given time
              return null;
          }
  
          return start0.after(start1) ? finalRules[0] : finalRules[1];
      }
docs: /*
  Find a time zone rule applicable to the specified time