question

Joe Hopkins avatar image
Joe Hopkins asked

GetLeaderboardAroundPlayerRequest returning wrong NextReset date

There is an issue with our NUM_TROPHIES statistic.

The next time the leaderboard will reset is 9/18/2017 12:02 AM:

But when we make the below call, result.NextReset incorrectly contains a value of 09/17/2017 00:00:00:

This is a problem because it causes our season countdown timers (which are in production) to show an incorrect amount of time left in the season.

Could someone please look at the NUM_TROPHIES statistic in our account and see why the Unity SDK is returning the wrong NextReset date? Thanks!

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.

brendan avatar image
brendan answered

The actual "reset" time of the leaderboard is, in fact, scheduled as 00:00:00 UTC. There are two aspects to this reset:

1. Triggering a statistic increment. We walk through the list of all stats requiring a reset, across all titles, and do this at the reset time. So all-up, this could take a few seconds (up to a minute, worst-case).

2. Collecting all the data for the leaderboard archive. This is queued from 1, and can take several minutes.

It looks like the Game Manager is showing a time based on the completion of 2. I'll open a bug for the Game Manager team to have a look at that. In the meantime though, the correct representation of the reset period should be what you get back from the NextReset info in the query.

6 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 ·

Hi Brendon,

Thank you for your response. I believe you are misreading the date/times, the NextReset value is off by about 24 hours, not just a couple minutes. This is a big problem for our implementation.

Joe

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

Ah, I see - this is caused by the API call returning an ambiguous value. You are correct that 9/17 00:00:00 should mean the morning of Sunday, 9/17, whereas the truth is that the leaderboard resets at midnight on the night of Sunday/morning of Monday at 00:00:00 UTC. Given that a change to the value returned by the API call could be considered a breaking change, we'll have to have a look at updating that to be more clear in a subsequent revision. For now, the thing to know is that the weekly leaderboard reset occurs at midnight UTC of the transition from Sunday to Monday.

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

Thanks again for your message. I would guess that no one else is using the NextReset value (because they would of run into the same issue we did). Any idea when a fix could be expected? Or, is there a way we could do a manual fix using our dashboard? We don't want to have to roll out updates to Apple and Google Play with hardcoded NextReset values.

0 Likes 0 ·
Show more comments
Show more comments
Joe Hopkins avatar image
Joe Hopkins answered

This is a PlayFab wide bug. The value of NextReset in weekly reseting leaderboards is off by 24 hours. Everyone should take this into account when developing their leaderboard UI's.

1 comment
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 ·

I am not sure how to mark this as a best answer.

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.