Fix timestamp conversion