Updated timestamp encoder