Fixed bug in id2tstamp, tests