diff --git a/server.js b/server.js index 8032b5b..6533548 100644 --- a/server.js +++ b/server.js @@ -147,7 +147,7 @@ app.get('/core/:id', function(req, res){ // Loop over elements in rows array, convert ugly UTC times to pretty local times. rows.forEach(function(row){ - var localDtTm = moment.utc((row.published_at || "").replace(/-/g,"/").replace(/[TZ]/g," ")).toDate(); + var localDtTm = moment.utc(row.published_at); localDtTm = moment(localDtTm).tz('America/New_York').format('MM-DD-YYYY HH:mm:ss'); row.published_at = localDtTm; });