fix timestamp conversion