I don't guarantee this to be correct, but it should be a good starting point. Make sure you check the dates you're using first, especially details like whether or not you're using T in between date and time, and whether your format specifies fractions of a second.
import { parse } from "date-fns";
parse("2019-10-12T07:20:50Z", "yyyy-MM-dd'T'HH:mm:ssX", new Date());
// => Date Sat Oct 12 2019 10:20:50 GMT+0300 (Eastern European Summer Time)