Question

purchased_at_ms The time is not accurate 

  • 3 January 2024
  • 1 reply
  • 13 views

Badge +4

purchased_at_ms The time is not accurate 
 
We found a problem and ask if the value purchased_at_ms is correct. 
We tested purchases-ios SDK version 3.14.4 and found the problem. 
We tested an iPhone 13 Pro Max, iOS 15.1, without a SIM card. 
With iOS 17.1, purchases-ios SDK 4.31.6 has the same problem 
 
”event_timestamp_ms": 1704269598747, "expiration_at_ms": 1737447173000, "purchased_at_ms": 1705824773000, three times are incorrect. 
Test Procedure Set the system time to 2024-1-21. A subscription purchase succeeds. purchased_at_ms's time is 2024-01-21 16:12:53 
Using version 3.14.2 purchased_at_ms is 2024-01-03 15:35:06 
 
Would you like to ask what is the problem caused by this?

 

This one uses version 3.14.4

This one uses version 3.14.2

 


1 reply

Userlevel 5
Badge +9

Hi @mtmakeupplus-2ceb61,

This information comes straight from Apple, so I believe the issue is on Apple’s end.

The first purchase you have, the StoreKitTest transaction, is decided by Xcode since it goes through Xcode, so I can’t really debug that one.

But for the second transaction, 2000000492128135, here is the purchase directly from Apple:

    {
"quantity": "1",
"product_id": "mp_1m_usd6",
"transaction_id": "2000000492128135",
"original_transaction_id": "1000000897283668",
"purchase_date": "2024-01-03 07:35:06 Etc/GMT",
"purchase_date_ms": "1704267306000",
"purchase_date_pst": "2024-01-02 23:35:06 America/Los_Angeles",
"original_purchase_date": "2021-10-25 06:45:47 Etc/GMT",
"original_purchase_date_ms": "1635144347000",
"original_purchase_date_pst": "2021-10-24 23:45:47 America/Los_Angeles",
"expires_date": "2024-01-03 07:40:06 Etc/GMT",
"expires_date_ms": "1704267606000",
"expires_date_pst": "2024-01-02 23:40:06 America/Los_Angeles",
"web_order_line_item_id": "2000000047085975",
"is_trial_period": "false",
"is_in_intro_offer_period": "false",
"in_app_ownership_type": "PURCHASED",
"subscription_group_identifier": "20891272"
}

As you can see the purchased_date_ms that Apple returns is the one you see in the RevenueCat dashboard, so this comes from the receipt. I’m not sure if Apple is returning the correct information but this is not related to the version of the RevenueCat SDK since it is coming from Apple’s API.

Reply