   (:require [clojure.pprint :as pp]
             [iwaswhere-web.files :as f]
             [clj-time.coerce :as c]
+            [matthiasn.systems-toolbox.component :as st]
             [me.raynes.fs :as fs]
             [clj-time.format :as tf]
             [clojure.tools.logging :as log])

        gps-date (get raw-exif "GPS Date Stamp")
        gps-time (get raw-exif "GPS Time-Stamp")]
    {:raw-exif  raw-exif
     :timestamp (if gps-date
                  (extract-ts (str gps-date " " gps-time))
                  ;; workaround since EXIF editor doesn't add timezone
                  (extract-ts (str (get raw-exif "Date/Time") ".00 UTC")))
     :latitude  (dms-to-dd lat-dms lat-ref)
     :longitude (dms-to-dd lon-dms lon-ref)}))


    'GPS Time-Stamp' '20:07:57.00 UTC'"
  [ts]
  (let [f (tf/formatter "yyyy:MM:dd HH:mm:ss.SS z")]
    (when (and (seq ts)
               (re-matches #"\d{4}:\d{2}:\d{2} \d{2}:\d{2}:\d{2}\.\d{2} [A-Z]{1,5}" ts))
      (c/to-long (tf/parse f ts)))))

(defn extract-from-tag
  "Creates map for a single Exif directory.
