Xcode 12 store kit test returning different date formats than actual receipts

If I'm looking at a date from an actual iOS App Store receipt (in local verify), the date looks like

Code Block
"2020-09-10T20:48:26Z"

which can be parsed by

Code Block
dateFormatter.dateFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'"

but the same date returned by StoreKitTest configuration would be:

Code Block
"2020-09-10T13:48:26-0700"

which requires a different format parser

Code Block
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"


I'd expect to not need to change this part of the parser, right? Or are both formats legitimate RFC 3339 date strings?
It looks like

Code Block
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"


works on both string types. Thoughts?
FB8724409
Thanks for the feedback that you filed, we'll take a look and make sure the format is consistent.
I've updated FB8724409 but can't tell if it has been assigned back to Apple. Testing this against Xcode 12B45b running Simulator Version 12.2 (940.16)
SimulatorKit 597.13.0.1
CoreSimulator 732.18.0.2
And iOS 14.2 in the simulator, the string in section 12 (creation date) is still formatted with the -0700 format, section 1704 (purchase date) is using the Z format, but the expiration date is still incorrect as well. The purchase date, however, is returning the local time but appending Z, rather than correctly converting the local time to UTC.
Xcode 12 store kit test returning different date formats than actual receipts
 
 
Q