This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-20
Channels
- # adventofcode (8)
- # aleph (2)
- # announcements (10)
- # aws (5)
- # aws-lambda (2)
- # babashka (23)
- # beginners (23)
- # biff (9)
- # calva (4)
- # cider (8)
- # clj-kondo (21)
- # clojure (77)
- # clojure-boston (1)
- # clojure-dev (50)
- # clojure-europe (36)
- # clojure-gamedev (3)
- # clojure-nl (1)
- # clojure-norway (3)
- # clojure-spec (33)
- # clojure-uk (3)
- # clojurescript (22)
- # core-async (3)
- # cursive (10)
- # datahike (18)
- # datalevin (1)
- # datascript (9)
- # deps-new (21)
- # emacs (11)
- # events (1)
- # graphql (11)
- # guix (26)
- # java (7)
- # jobs (3)
- # lsp (12)
- # malli (6)
- # pathom (33)
- # pedestal (3)
- # polylith (15)
- # reagent (5)
- # releases (3)
- # remote-jobs (1)
- # scittle (9)
- # sql (27)
- # tools-build (9)
- # vim (7)
I’m trying to find good documentation that explains why DateTimeFormatter.ISO_LOCAL_DATE_TIME
strips zeros off of millisecond/nanosecond values in Java 8 - 18? For example, 2023-01-20T10:39:00.370
is formatted as 2023-01-20T10:39:00.37
. If I then parse that back using the same formatter, it again is represented as 370 milliseconds.
As far as I can tell, the first three digits are assumed to represent milliseconds; the second three, microseconds; and the final three, nanoseconds. So, if I’m reading/understanding correctly, 37
represents 370
because the final zero is implied (and 037
would be used for 37ms)?
the first 3 digits are "milliseconds" because 1000 milliseconds is a second, and the first 3 digits after a decimal are tenths, hundredths, thousandths