Hello,
I want to compare the dates of in-app purchases, and would like to know if the OriginalPurchaseDate is always in UTC timezone?
Decoding the receipt on device, the date is in RFC3339 format, a format which allows for a timezone offset of +HH:MM or -HH:MM but all the receipts I have seen use the "Z" format which indicated timezone is UTC. Is it safe to assume all dates in the OriginalPurchaseDate field will be UTC timezone ?
On Device Receipt
CancelDate = "";
OriginalPurchaseDate = "2017-01-03T13:07:31Z";
OriginalTransactionIdentifier = 1000000262542087;
ProductIdentifier = "com.mycompany.app.sub.1month";
PurchaseDate = "2017-01-03T13:07:29Z";
Quantity = 1;
SubExpDate = "2017-01-03T13:12:29Z";
TransactionIdentifier = 100000262542087;
WebItemId = 18446744072207895811;Server Validated Receipt
For server validated receipts the response we get from Apple, includes extra useful fields, like the original_purchase_date_ms which gives the date as an UTC epoch time in millisenconds. Is this field supported ? It's not in the receipt fields documentation that I am aware of.
[quantity] => 1
[product_id] => com.sparkleapps.puzzlepack.landmarks3
[transaction_id] => 20000192364074
[original_transaction_id] => 20000192364074
[purchase_date] => 2015-06-10 22:27:30 Etc/GMT
[purchase_date_ms] => 1433975250000
[purchase_date_pst] => 2015-06-10 15:27:30 America/Los_Angeles
[original_purchase_date] => 2015-06-10 22:27:30 Etc/GMT
[original_purchase_date_ms] => 1433975250000
[original_purchase_date_pst] => 2015-06-10 15:27:30 America/Los_Angeles
[is_trial_period] => falseMany Thanks