I'm tying to figure something out which involves Leaderboard data upon reset. We use Leaderboards to manage seasons in our game via the reset frequency. When the game is open and the season ends the game waits X seconds and then attempts to query the leaderboard's previous version. This is so we can see who won the last season, or in other words, the season which just ended. We've had some issues with this querying too far back and throwing an exception. So to manage this issue we query the existing leaderboard Version first and then use that Version-1 to get the previous version. However this can still cause an issue because the leaderboard Version doesn't seem to increment immediately when the NextReset time is reached, I'm not sure what the timeframe on that is. So to manage that issue we also check the existing leaderboard's NextReset time to see if it's in the past. If it is then we know that using existing leaderboard Version-1 would query a leaderboad version too far back throwing an exception. Unfortunately this doesn't work because the leaderboard Version and NextReset don't seem to line up in this scenario. The NextReset seems to update immediately while the Version doesn't. Example:
Before reset:
Leaderboard.Version = 9, Leaderboard.NextReset = Tuesday
Shortly after reset:
Leaderboard.Version = 9, Leaderboard.NextReset = Wednesday
Expected (Shortly after reset):
Leaderboard.Version = 10, Leaderboard.NextReset = Wednesday
or
Leaderboard.Version = 9, Leaderboard.NextReset = Tuesday
And of course, eventually once leaderboard updating/archiving is complete:
Leaderboard.Version = 10, Leaderboard.NextReset = Wednesday
In the above example trying to query version 8 would throw an exception because it would be 2 leaderboard versions back, not 1, even though the existing version is showing 9. This would be fine, except we can't accommodate for this because the NextReset doesn't match up with the Version.