working version of read_timestamp for binary seeking