     "yyyy-MM-dd'T'HH:mm:ss.SSSZ"))
 
 (defn parse-datetime [string]
-  (f/parse multi-parser string))
+  (if (empty? string) nil
+    (try
+      (f/parse multi-parser string)
+      (catch Exception ex
+        (throw (Exception. (str "Failed parsing datetime string: \"" string "\"") ex))))))
 
 (defn trkpt-seq-inner [point]
   (lazy-seq

  [zpoint]
    { :lat (read-string (attr zpoint :lat))
      :lon (read-string (attr zpoint :lon))
      :ele (read-string (xml1-> zpoint :ele text))
      :time (parse-datetime (xml1-> zpoint :time text)) })

(defn parse-metadata
  "Returns the gpx metadata

   [zgpx]
   { :name (xml1-> zgpx :metadata :name text)
     :desc (xml1-> zgpx :metadata :desc text)
     :time (xml1-> zgpx :metadata :time text parse-datetime)
     :link (xml1-> zgpx :metadata :link (attr :href)) })

(defn parse-gpx-inner [zgpx]
  { :points (map parse-trkpt (trkpt-seq zgpx))
