From the javadoc for offsetsForTimes:
If the topic does not support timestamp search (i.e. magic 1 and above), we include the partition in the map with a null value, as described above. If the topic supports timestamp search but no offset could be found, we just leave the partition out of the map. We should make this behavior consistent and include the partition with a null value in the result.