date['#text'] is incorrect for my TZ, showing 5hrs ahead

 
    • alksdeef a dit :...
    • Utilisateur
    • 19 fév. 2012, 4h44m

    date['#text'] is incorrect for my TZ, showing 5hrs ahead

    Hi all,

    I couldn't find this in my searches, hopefully something simple.

    I'm grabbing from this JSON feed :

    http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=alksdeef&api_key=xxxxx&format=json&callback=?

    where my api_key is my api_key. Everything shows up fine except the time shown is a little over 5 hrs ahead of my timezone (EST). Any idea what might be causing this? Looking at my "recently played" -> settings I see it is set correctly to EST.

    Thanks,
    Forrest

    • alksdeef a dit :...
    • Utilisateur
    • 19 fév. 2012, 15h28m

    utc only, why???

    Great so now I see that the time is UTC, so I have to convert this time to EST myself? Why wouldn't it give me the time as EST because that's what I set my TZ to?

    • tburny a dit :...
    • Forum Moderator
    • 29 fév. 2012, 17h19m
    Last.fm cannot know your local timezone and your application might have users on the other side of the world where users have a different time zone than yours. You'll have to determine the timezone and daylight saving time yourself and add it to the UTC time.

    Combo.fm: Combine your favourite radio stations! | My Blog | scala-lastfmapi | Cache2k - A high performance Java in-memory cache
    P.S.: Do not click here
    throw new PokemonException(); //Gotta catch 'em all
    My forum post reflects my personal opinion :)
Les utilisateurs anonymes ne peuvent pas poster de messages. Merci de vous connecter ou de créer un compte pour pouvoir intervenir dans les forums.