I have a variable called
posts_object[i].updated_time
It’s always an utf-timecode. It seems to always send three zeroes too much. A few examples:
Unix Date
1339705666000 · 2012-06-14T20:27:46+0000
1280403912000 · 2010-07-29T11:45:12+0000
1338635118000 · 2012-06-02T11:05:18+0000
The code:
postobj.created=posts_object[i].updated_time.substring(0,10);
var sortvar= (posts_object[i].updated_time);
postobj.sort=Date.parse(sortvar);
JavaScript uses timestamps in milliseconds, rather than whole seconds like timestamps are “supposed” to be. Since there are 1000 milliseconds in a second, that would explain the three extra zeroes.