 
       (db/add-jar db account pom)
       (search/index! search (assoc pom
-                              :at (.lastModified pom-file)))
+                                   :at (Date. (.lastModified pom-file))))
       (spit (io/file dir ".finalized") ""))
     (throw-invalid "no pom file was uploaded")))
 

(ns clojars.routes.repo
  (:require [clojars
             [auth :refer [with-account]]
             [db :as db]
             [errors :refer [report-error]]

             [storage :as storage]]
            [clojure.java.io :as io]
            [clojure.string :as str]
            [compojure
             [core :as compojure :refer [PUT defroutes]]
             [route :refer [not-found]]]
            [ring.util
             [codec :as codec]
             [response :as response]])
  (:import (java.io FileFilter IOException FileNotFoundException File)
           (java.util Date UUID)
           org.apache.commons.io.FileUtils))

(defn save-to-file [dest input]
  (-> dest
