fix formatDateTime in js