Think the format string shouldn't have the `Z` in quotes, as it outputs the literal string Z, rather than the timezone, i.e. should be

`yyyy-MM-dd'T'HH:mm:ssZ`