replace time by tm