   (let [extension-keys (filter (fn [key]
                                  (.startsWith (name key) "X-"))
                                (keys data))
-        tracker (get-tracker! (:tracker_identifier data))
+        tracker (get-tracker-by-identifier! (:tracker_identifier data))
         latitude (:latitude data)
         longitude (:longitude data)
+
         event-entity (insert event (values
                                     {:tracker_id (tracker :id)
-                                     :event_time (:event_time data)
+                                     :event_time (or (to-sql-timestamp (:event_time data))
+                                                     (current-sql-timestamp) )
                                      }))]
 
     (if (and latitude longitude)

                               :satellite_count (:satellite_count data)
                               :altitude (:altitude data)}))
      )
    (doseq [key extension-keys]
      (insert event-extension-value
              (values

  (defentity event-extension-type
    (table :event_extension_types)
    (pk :id)
    (entity-fields :name :description)
    )

  (defentity event-extension-value
    (table :event_extension_values)
    (pk :id)
    (entity-fields :value)
    (belongs-to event-extension-type {:fk :event_extension_type_id})
    )

