code: private static int search(
          long posixTime,
          ZonalTransition[] transitions
      ) {
  
          int low = 0;
          int high = transitions.length - 1;
  
          while (low <= high) {
              int middle = (low + high) / 2;
  
              if (transitions[middle].getPosixTime() <= posixTime) {
                  low = middle + 1;
              } else {
                  high = middle - 1;
              }
          }
  
          return low;
  
      }
docs: returns index of first transition after posixTime