MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

Inconsistent timezones for timestamps

Last post 07-07-2009 10:00 AM by Michael<>'"♥. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-26-2009 2:39 PM

    Inconsistent timezones for timestamps

    http://pic.im/6a8
    Timestamps returned from /users/{userid}/friends/status are not consistent with what I see on the MySpace friends-status page. In the picture linked above, you can see timestamps in my app that match those on the website (in green boxes). There's one timestamp-pair in this picture that doesn't match, highlighted in red (the one displayed on myspace.com is correct). There are other timestamps that are incorrect as well, though they aren't shown in this picture.
  • 06-27-2009 7:57 AM In reply to

    Re: Inconsistent timezones for timestamps

     Hi Michael,

    All time-stamps returned from our API come in GMT unless otherwise specified, where as all time-stamps that you see on your user home page will be localized according to your time zone. As a result, it is expected that these won't match up correctly unless you transform the time zones yourself or specificy the time zone your desire on your API call.

    You can read more about specifying time zones here:

    http://wiki.developer.myspace.com/index.php?title=Date%2C_Time_and_Timezone_Formats

  • 06-29-2009 10:10 AM In reply to

    Re: Inconsistent timezones for timestamps

    Yes, I've transformed them all to the local time zone; that's why some of them are correct. The problem is that after the transformation some of the timestamps are incorrect (using the user home page as a reference), as outlined in the image and described in my original post.
  • 07-07-2009 10:00 AM In reply to

    Re: Inconsistent timezones for timestamps

    At 12:45pm EDT (GMT-4) I changed the status on one account. In the activities ATOM feed of another account it reported the status published/updated time to be "2009-07-07T00:44:46Z". The actual GMT timestamp it was submitted should be "2009-07-07T16:44:46Z" (12:44 - (-04:00) = 16:44).

    The time being reported by the activities feed is 16 hours off from GMT.

    The URI requested was /v1/users/77232795/friends/activities.atom?activityTypes=StatusMoodUpdate&dateFormat=utc

    side note: this post was apparently published at 2pm, which would be correct in GMT-3, but it's one hour in the future for my geographical location. my post about incorrect timestamps appears to have an incorrect timestamp. :(
Page 1 of 1 (4 items)