                      (:location cliopts))
         initfile (when (or ; fetch the XML if a cached copy doesn't exist or is over 15 mins old
                         (not (.exists (io/file filename)))
-                        (> (- (.getTime (java.util.Date.))
-                              (.lastModified (io/file filename)))
-                           900000))
+                        (olderthan (io/file filename) 900000))
                    (spit filename
                          (:body
                           (client/get datauri))))

         (tag= :result) (tag= :MeasurementTimeseries)
         (attr= :gml/id measurement) (tag= :point) (tag= :MeasurementTVP)]
        points (eduction (apply comp path) [ennuste])]
    (cond
      (:help cliopts)
      (println (str "-l, --location PLACE [" (:defaultlocation (config)) "]\n-m --measurement [" (:defaultmeasurement (config)) "]\n\nPossible values for measurement are:\n" (clojure.string/join " " (sort measurements))))

  ;; An option with a required argument
  [["-l" "--location PLACE" "Location"
    :default (:defaultlocation (config))
    :validate [#(string? %) "Must be a string"]]
   ;; A non-idempotent option
   ["-m" "--measurement MEASUREMENT" "Measurement"
