XboxLeaders / XboxLiveAPI

[DEPRECATED] Please visit https://xboxapi.com for API services.
http://www.xboxleaders.com
MIT License
117 stars 26 forks source link

Achievements negative unlock date #29

Closed turricanLive closed 11 years ago

turricanLive commented 11 years ago

Hi, I've noticed that when retrieving a game achievements sometimes the unlock date is a negative number. Example: https://www.xboxleaders.com/api/2.0/achievements.json?gamertag=Turrican&gameid=1480657549

djekl commented 11 years ago

I recieve the exact same numbers on my api. https://xboxapi.com/dev/achievements/1480657549/Turrican

It seems that its an achievement unlocked offline. Will need to include that in this one here to help.

turricanLive commented 11 years ago

Do you know if there a way to derive the actual date from this negative number?

djekl commented 11 years ago

Achievements unlocked offline don't have a date associated with them. I am assuming here but I know a unix timestamp at 0 is 1970, this negative time is probably 000-00-00 00:00:00

jasonclemons commented 11 years ago

That timestamp translates to Tue, 20 Apr 1948 07:18:00 GMT. I'm sure it's zero hour for the way Microsoft does their timestamps.

I will leave it the way it is now, but I have added an unlockedoffline key to designate achievements unlocked offline.