   "zero pad timepicker digits"
   (goog.string/format "%02d" num))
 
-(defn get-hours []
-  (.getHours @selected-time))
-
-(defn get-minutes []
-  (.getMinutes @selected-time))
-
-(defn set-hours! [new-hours]
-  (swap! selected-time #(doto % (.setHours new-hours))))
-
-(defn set-minutes! [new-mins]
-  (swap! selected-time #(doto % (.setMinutes new-mins))))
+(defn minutes-to-ms [mins]
+  (* mins 60000))
+
+(defn hours-to-ms [hours]
+  (* hours 3600000))
 
 (defn sync-time-with-snapshot! []
-  (reset! selected-time (js/Date. (:time (@snapshot-list @snapshot-index)))))
+  (reset! selected-time (:time (@snapshot-list @snapshot-index))))
 
 ; TODO: This could be improved. Probably need to rethink my data model
 (defn show-closest-snapshot! []
-  (let [timestamp (.getTime @selected-time)
+  (let [timestamp @selected-time
         earlier-index (first (keep-indexed #(if (>= timestamp (:time %2)) %1) @snapshot-list))
         later-index (max (dec earlier-index) 0)
         later (:time (@snapshot-list later-index))

  (on ($ js/document) "keydown" on-keydown)

  (-> ($ "body")
    (on "click" ".toggle-meridian" click-toggle-meridian)
    (on "click" ".decrement-hour" click-decrement-hour)
    (on "click" ".increment-hour" click-increment-hour)


(defn init-snapshot-list []
  (->> (.-SNAPSHOT_LIST js/window) ; server injected to this in a <script>
       (js->clj)
       (clojure.walk/keywordize-keys)
       (reset! snapshot-list)))

(defn init-snapshot-index []
  (let [image (attr ($ "#currentSnapshot") "src")
