B-37937: fix issue of wrongly calculating the entry found with the specified timestamp