Restore timestamp to db