Skip to content

Commit

Permalink
Replaced deprecated to-java-date function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mluypaert committed Jan 17, 2024
1 parent 9839729 commit b1e29ea
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/wormbase/names/importers/processing.clj
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
(jt/zoned-date-time tz)
(jt/with-zone-same-instant tz)
(jt/instant)
(jt/to-java-date)))
(jt/java-date)))

(defn check-environ! []
(when-not (environ/env :token)
Expand Down
2 changes: 1 addition & 1 deletion src/wormbase/names/provenance.clj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
whence (-> (get prov :provenance/when (jt/instant))
(jt/zoned-date-time tz)
(jt/with-zone-same-instant tz)
(jt/to-java-date))
(jt/java-date))
how (-> request :headers wna/identify)
why (:provenance/why prov)
prov {:db/id "datomic.tx"
Expand Down
8 changes: 4 additions & 4 deletions src/wormbase/names/recent.clj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
(jt/instant))]
(-> max-date
(jt/plus (jt/seconds 1))
(jt/to-java-date))))
(jt/java-date))))

(def imported-date (memoize find-max-imported-date))

Expand All @@ -45,7 +45,7 @@
from-t (if (and from (>= (compare from import-date) 0))
from
import-date)
until-t (or until (jt/to-java-date (jt/instant)))]
until-t (or until (jt/java-date (jt/instant)))]
;; Timings for the `tx-ids` query below with default configured time window (60 days)
;; (excluding pull expressions)
;; jvm (cold): 107.266427 msecs
Expand Down Expand Up @@ -117,7 +117,7 @@
(let [{conn :conn db :db} request
log (d/log conn)
from* (or from (wu/days-ago wsr/*default-days-ago*))
until* (or until (jt/to-java-date (jt/instant)))
until* (or until (jt/java-date (jt/instant)))
items (activities db log rules puller (or needle "") how from* until*)
etag (some-> items first :t wnu/encode-etag)]
(some-> {:from from* :until until*}
Expand Down Expand Up @@ -179,7 +179,7 @@
(binding [db (d/db conn) log (d/log conn)
pull-prov-only (prov-only-puller db log)
pull-changes-and-prov (changes-and-prov-puller db log)
from (jt/to-java-date (jt/instant))
from (jt/java-date (jt/instant))
until (wu/days-ago 2)]
(activities db log entity-rules pull-changes-and-prov "gene")
(activities db log entity-rules-rules pull-changes-and-prov "gene" from until)
Expand Down
4 changes: 2 additions & 2 deletions src/wormbase/util.clj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
(defn days-ago [n]
(-> (jt/instant)
(jt/minus (jt/days n))
(jt/to-java-date)))
(jt/java-date)))

(defn format-java-date [dt & {:keys [tz fmt]
:or {tz (jt/zone-id)
Expand All @@ -73,7 +73,7 @@
([tz]
(-> (jt/instant)
(jt/zoned-date-time (jt/zone-id tz))
(jt/to-java-date)))
(jt/java-date)))
([]
(now "UTC")))

Expand Down
2 changes: 1 addition & 1 deletion test/wormbase/test_utils.clj
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
(defn provenance
[_ & {:keys [how what whence why person _ batch-id]
:or {how :agent/console
whence (jt/to-java-date (jt/instant))
whence (jt/java-date (jt/instant))
what :event/test-fixture-assertion
person [:person/email "[email protected]"]}}]
(merge {:db/id "datomic.tx"
Expand Down

0 comments on commit b1e29ea

Please sign in to comment.