fix time display in js