Skip to content

Commit

Permalink
Fix jdk version retrieval (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoKramer authored Nov 28, 2023
1 parent f20a80c commit 0b2553d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/src/main/cljc/jarl/time.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@

#?(:clj
(def ^:private jvm-major-version
(let [jvm-version (System/getProperty "java.vm.version")]
(parse-long (subs jvm-version 0 (str/index-of jvm-version "."))))))
(let [jvm-version (System/getProperty "java.specification.version")]
(if-let [dot-idx (str/index-of jvm-version ".")]
(parse-long (subs jvm-version (+ dot-idx 1)))
(parse-long jvm-version)))))

#?(:clj
(defn- fixup-am-pm
Expand Down

0 comments on commit 0b2553d

Please sign in to comment.