question

ahayes-ovs avatar image
ahayes-ovs asked

Sandbox date/time?

I'm using the ANE for Amazon InAppBilling. It appears that the purchase dates I see in receipts are off by five months. It is June and I get January. The rest of the date and the time seems ok. Is the sandbox doing this? I would mention that the purchases are subscriptions. Thanks.
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ahayes-ovs avatar image
ahayes-ovs answered
I take that back. The day of the month is ok, the rest is wrong.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Ahayes-ovs, Thank you for your post. Did you mean that the day is matching with current date and month and year are coming wrong with the receipt? Please clarify your query.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ahayes-ovs avatar image
ahayes-ovs answered
Is the sandbox supposed to return a reasonable date time in a purchase success or purchase update event? I am using the AmazonPurchase ANE and Actionscript. I don't see anywhere in your API that it says what units the times are in, seconds or milliseconds. I've tried both. I get back dates that are obviously wrong, 1970. Any ideas?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Ahayes-ovs, Thanks for the information. We need little more clarification to debug the issue. I would like to know which field's value in the "Receipt" is coming wrong. There is no field for purchase date in the receipt. Are you talking about "subscriptionStartDate"? If it's subscriptionStartDate, the value should be representing ms since 1970 for the start date of the item. Is your device date set properly? Please clarify. Thanks.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ahayes-ovs avatar image
ahayes-ovs answered
Yes, subscriptionStartDate. I mentioned in my original post that I was testing subscriptions. Yes, the device date/time is correct; it's set automatically. I'm using the same code to convert the time in ms to an ActionScript Date object. It works everywhere else except on the subscriptionStartDate. I assume subscriptionEndDate would work the same way. My question was whether it was the sand box that might be wrong and the code would work correctly in the real world.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Ahayes-ovs, Thank you for the information. In live mode the dates would come with correct value. But in sandbox also sdk tester should take care of the time. I will cross check and post back. Thanks for the patience.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.