xa: fix timestamp calculation