Back story: When I started to use Pandora, I had it submit my tracks to last.fm so it would show up on my profile. But, it didn't. Last.fm would give me a message saying that spam protection was triggered because the timestamp on the submission was before my last submission (from amaroK). So, a little test shows that it does submit it, only 5 hours in the past. Not coincidentally, I'm in UTC-5 timezone.
So, PJ submits tracks with improper timestamps. Audioscrobbler needs Unix timestamps to accompany each submission. Unix timestamps are always in UTC, BTW.
I poked around in LastFmLookup.java, and found this:
Date date = new Date();
DateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
req = new GetMethodWebRequest(lastFMUrl);
req.setParameter("u", userName);
String s = md5(md5(password) + key);
LOG.debug("hex = " + s);
req.setParameter("s", s);
req.setParameter("a[0]", songInfo.getArtist());
req.setParameter("t[0]", songInfo.getTitle());
req.setParameter("b[0]", songInfo.getAlbum()!=null?songInfo.getAlbum():"");
req.setParameter("m[0]", "");
req.setParameter("l[0]", "255");
req.setParameter("i[0]", simpleDateFormat.format(date));
res = wc.getResponse(req);
text = res.getText();
if (text.indexOf("OK") == -1) {
String msg = "a problem was encountered whille attempting to add track to last.fm: " + text;
LOG.warn(msg);
throw new RuntimeException(msg);
}
LOG.info("successfully added track to last.fm");
Where i[0] is the timestamp. It's submitting with the format "yyyy-MM-dd HH:mm:ss", and if I'm not mistaken, Unix timestamps look like "1162252620". So:
#1: It isn't UTC time
#2: It's not a unix timestamp