From cdaf409a991660a17e551f22fbc12ce251d0e5e7 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 27 Sep 2013 11:53:25 -0400 Subject: [PATCH] monkey-patching getPostsByPids so that it returns ISOString instead of relativeTime --- src/posts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/posts.js b/src/posts.js index ab9bacd67b..d3a804acf6 100644 --- a/src/posts.js +++ b/src/posts.js @@ -170,10 +170,10 @@ var RDB = require('./redis.js'), multi.exec(function (err, replies) { async.eachSeries(replies, function(postData, _callback) { if(postData) { - postData.relativeTime = utils.relativeTime(postData.timestamp); + postData.relativeTime = new Date(parseInt(postData.timestamp,10)).toISOString(); postData.post_rep = postData.reputation; postData['edited-class'] = postData.editor !== '' ? '' : 'none'; - postData['relativeEditTime'] = postData.edited !== '0' ? utils.relativeTime (postData.edited) : ''; + postData['relativeEditTime'] = postData.edited !== '0' ? (new Date(parseInt(postData.edited,10)).toISOString()) : ''; if(postData.uploadedImages) { try {