1

I am developing app for 4sq which monitors users' checkins and builds flight statistics (JetLovers.com). Sometimes I see quite weird data in checkin's createdAt, for instance:

2012-05-03 04:22:37 38.769611 -9.131699 Aeroporto de Lisboa (LIS) 2012-05-03 04:23:00 40.644569 -73.783493 John F. Kennedy International Airport (JFK)

I doubt this person found teleportation machine and travelled 3000 miles in 3 seconds.

My question is how this data is generated and how can we rely on it.

Sergey
  • 36
  • 4
  • It's possible if the times are local times? – Junuxx May 23 '12 at 14:15
  • Nope, due to documentation: "Seconds since epoch when this checkin was created." – Sergey May 23 '12 at 14:21
  • But your post doesn't show seconds but a date/time string. Are you really certain that it isn't localized somewhere in the conversion process? Because the time difference and flight time certainly make it possible. – Junuxx May 23 '12 at 14:51
  • Alternatively, maybe someone tried to check in at JFK, shut down the phone before the checkin was complete, and it was cached and resent on arrival in Lisbon? BTW, it's 23 seconds, not 3. – Junuxx May 23 '12 at 14:56
  • You are right, its 23 seconds :) Still too fast for human being. – Sergey May 23 '12 at 14:58

1 Answers1

4

I think checkins createdAt data is coming with time value (counting from 1970) without milliseconds and timeZoneOffset, I checked in at two places with the difference of 1 sec.

{
    "id":"4fc88864e4b04ec64af27a3c",
    "createdAt":1338542180,
    "type":"checkin",
    "shout":"He he",
    "timeZone":"America\/New_York",
    "timeZoneOffset":-240,
    "venue":{
            "id":"4eb1386282317685624c2e18",
            "name":"11220 Brooklyn, NY",
            "contact":{},
            "location":{
                    "lat":40.65082835341778,
                    "lng":-74.00814735447314,
                    "country":"United States"
             }
     }
}



{
    "id":"4fc88863e4b005dcbe793e44",
    "createdAt":1338542179,
    "type":"checkin",
    "shout":"Original place",
    "timeZone":"Asia\/Kolkata",
    "timeZoneOffset":330,
    "venue":{
        "id":"4f45d635e4b035f2e5635241",
        "name":"Prernathirth Derasar",
        "contact":{},
        "location":{
            "lat":23.020828247070312,
            "lng":72.52046966552734,
            "country":"India"
        }
    }
}

here i checked in at two different places in the time span of 1 second, You can see timeZoneOffset is there for differentiate timezones.

Ranganadh Paramkusam
  • 4,258
  • 2
  • 22
  • 33