question

Daniel Kiefer avatar image
Daniel Kiefer asked

Consumable Item not removed with 1 sec life time

i am currently testing In App purchases.

i set the bundles to be consumable by time with 1 sec.

now there seems to be something off with the time here:

this is what i am seeing in the inventory: 

2016/04/06 14:52:06 
2016/04/06 12:52:07

I am located in germany, the first line matches the time bought in local time,

the second time should be 14:52:07 not 12:52:07 

10 |1200

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

brendan avatar image
brendan answered

All the server timestamps are in UTC, which is two hours behind your time in Germany, hence the difference. If you're seeing two different times for one purchase, can you provide specific details about where you're seeing this, including the PlayFab ID of the user and Item Instance ID?

10 |1200

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

Daniel Kiefer avatar image
Daniel Kiefer answered

The User ID is :

157B549959C8C1B3

  the item instance ID? where do i find it? I got an order ID 14417192544394512030 Item Coin Package #1 (com.danielkiefer.slotmachine.coinpackage1)

When i am looking at the play stream debugger it gives me my local time in the timestamp. Maybe this has something to do with it?

10 |1200

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

brendan avatar image
brendan answered

No, the Game Manager has a setting to show you times in your local timezone - it's in your account settings.

The Item Instance ID is returned whenever an item is added to the player's inventory, whether from a purchase or grant operation, so it should be coming back with the timestamp you referenced. Let me ask this - you said that you're seeing two different timestamps "in the inventory". What does that mean, exactly? Where are you seeing these timestamps? In the Game Manager? As a response to an API call? What are the specific repro steps to make this issue occur?

10 |1200

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

Daniel Kiefer avatar image
Daniel Kiefer answered

In the GameManager in the Inventory i am seeing these timestamps at Created>expires column.

Because as i said i made the purchase a consumable with 1 sec lifetime so it will not clutter the inventory.

Repro Steps. Purchasing a consumable Item with 1sec lifetime

10 |1200

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

brendan avatar image
brendan answered

Aha! Thanks - it would appear that the Game Manager is showing one of the times in UTC and the other in your configured time zone. The expiration time is actually set correctly. I've filed a bug to have the Game Manager team fix the display.

10 |1200

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

Daniel Kiefer avatar image
Daniel Kiefer answered

Well it is Not just Showing the wrong Time it is also calculating with that time, because the item is never removed from the player inventory, and it should be removed after 1sec 

10 |1200

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

brendan avatar image
brendan answered

The item still appears to be in the player's inventory because that player hasn't signed back in. As with currency, the recalculation of inventory occurs on an as-needed basis. As soon as the player queries inventory again, it will be expired and removed.

10 |1200

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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