From ccfdce32b0bb4fa823bd3dd60c82401327af5b8c Mon Sep 17 00:00:00 2001
From: jkaplon <jody@kaplon.us>
Date: Tue, 25 Aug 2015 17:32:05 -0400
Subject: [PATCH] Convert UTC dates/times to local times.

---
 server.js       | 2 ++
 views/index.hbs | 8 ++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/server.js b/server.js
index 72613f8..26e2592 100644
--- a/server.js
+++ b/server.js
@@ -80,6 +80,8 @@ app.get('/', function(req, res){
 
             // Loop over elements in rows array, convert ugly UTC times to pretty local times.
             rows.forEach(function(row){
+                row.pubDate = courtsopenUtils.getLocDateFromUTC(row.published_at);
+                row.pubTime = courtsopenUtils.getLocTimeFromUTC(row.published_at);
                 if(row.status.toLowerCase().indexOf('closed') > -1){
                     row.statusClass = 'closed';
                 } else { row.statusClass = 'open'; }
diff --git a/views/index.hbs b/views/index.hbs
index 9021949..118efa5 100644
--- a/views/index.hbs
+++ b/views/index.hbs
@@ -7,6 +7,10 @@
     <h2>{{values.0.status}}</h2>
 </div>
 <br />
-<h3>Update received, {{values.0.published_at}}</h3>
+<div>
+    <h3>Update received: {{values.0.pubDate}}, {{values.0.pubTime}}</h3>
+</div>
 <br />
-<h4>Prior update was, {{values.1.status}} at {{values.1.published_at}}</h4>
+<div>
+    <h4>Prior update was: {{values.1.status}} at {{values.1.pubDate}}, {{values.1.pubTime}}</h4>
+</div>