code: private static int searchLocal(
          long localSecs,
          ZonalTransition[] transitions
      ) {
  
          int low = 0;
          int high = transitions.length - 1;
  
          while (low <= high) {
              int middle = (low + high) / 2;
              ZonalTransition zt = transitions[middle];
              int offset = Math.max(zt.getTotalOffset(), zt.getPreviousOffset());
  
              if (zt.getPosixTime() + offset <= localSecs) {
                  low = middle + 1;
              } else {
                  high = middle - 1;
              }
          }
  
          return low;
  
      }
docs: returns index of first transition after local date and time