question

Joe Hopkins avatar image
Joe Hopkins asked

How do we get the DateTime for when a leaderboard was reset?

We would like to know how long ago a leaderboard was reset.

This is because we don't want to show our leaderboard interface until PlayFab has finished all of the stat/rank processing and distribution of rewards. So we would like to wait 10 minutes or so.

Something like this would be helpful:

GetLeaderboardAroundPlayerResult.LastReset.Value

Leaderboards and Statistics
10 |1200

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

1 Answer

·
pfnathan avatar image
pfnathan answered
3 comments
10 |1200

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

Joe Hopkins avatar image Joe Hopkins commented ·

We already know how to get NextReset. We would like to get the DateTime of the last reset.

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ Joe Hopkins commented ·

Thanks for the reply.

What you should do is following;

1. GetLeaderboard call on version 3 of the leaderboard (Let's use version 3 as the current version of the leaderboard that will be reset soon)

2. Cache the NextReset time locally of version 3

3. You now have the time for the NextReset... so when about to approach the NextReset time for version 3 of the leaderboard, you make sure to have padding for 10 minutes before showing any UI elements. Note that in the background, PlayFab has already granted the prizes.

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ pfnathan ♦ commented ·

Update: Turns out, above suggestion is not a realistic solution so it might not work as you desired. What you need is a “timestamp of the reset” to be returned to the data for the “previous version,” This needed to be a new feature so please post your request to the feature request. Thank you.

0 Likes 0 ·

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.