Game Center reporting incorrect dates in lastTurnDate

Originator:ben
Number:rdar://10660917 Date Originated:1/8/12
Status:Closed Resolved:7/26/12
Product:iOS Product Version:5.01
Classification:Other Bug Reproducible:Always
 
Summary:
  When checking the lastTurnDate on a participant in Game Kit Turn Based Match, the date reported is sometimes incorrect. 

Steps to Reproduce:
  Play a bunch of game center matches, and keep an eye on lastTurnDate. I've not yet found a reliable way to reproduce this, but we're attempting to do it with some sample code.

Expected Results:
  lastTurnDate should be the date the player last made a move. It should DEFINITELY be later than the creation date of the game. 

Actual Results:
   In the sample out put below (cut and pasted from the terminal while playing a game in the sandbox), the creation date is January 8th, but one of the players has a lastTurnDate of January 3rd. 

(gdb) po [match valueForKey: @"creationDate"]
2012-01-08 20:08:38 +0000
(gdb) po match
<GKTurnBasedMatch 20ca30	id:37f56178-1550-43e8-b228-db3ba8a80180 status:Open message:D: iPhone 4 for Ben Played SLID for 6 taken:2012-01-08 21:07:33 +0000 created:2012-01-08 20:08:38 +0000
current:<GKTurnBasedParticipant 207650 - id:G:1178460943 (local player) status:Active outcome:None lastTurn:2012-01-08 21:07:33 +0000>
participants:
		<GKTurnBasedParticipant 210360 - id:G:616910683 status:Active outcome:None lastTurn:2012-01-03 21:10:32 +0000>
		<GKTurnBasedParticipant 207650 - id:G:1178460943 (local player) status:Active outcome:None lastTurn:2012-01-08 21:07:33 +0000>
	>
(gdb) 

08-Jan-2012 03:39 PM Ben Gottlieb:
it looks like Game Center is using the device's time to store this value, not server time. This means, that if the devices are not perfectly in-sync, this value is not usable.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!