Fork me on GitHub
#babashka
<
2022-10-31
>
Jeffrey Bay21:10:17

hi all, can anyone explain what's happening here?

user=> (def t (ZonedDateTime/now))
#'user/t
user=> (def zr (.getRules (.getZone t)))
#'user/zr
user=>  (def instant (.toInstant t))
#'user/instant
user=> (.isDaylightSavings zr instant)
Method isDaylightSavings on class java.time.zone.ZoneRules not allowed! [at <repl>]
user=>

Jeffrey Bay21:10:24

this is the commonly suggested way to determine if a ZonedDateTime (i.e. a java time) is in daylight savings or not, but I can't seem to execute it on Babashka 0.9.161

borkdude21:10:44

This is a roundabout way of saying that this class isn't available in bb yet., We should add it here: https://github.com/babashka/babashka/blob/ccc1512bb67469268493deec4a24b8f6390602cf/src/babashka/impl/classes.clj#L370 I can provide you with a temporary new binary after it's added there.

Jeffrey Bay21:10:06

that would be great, thanks

borkdude21:10:01

Which os are you on?

Jeffrey Bay21:10:45

that's what you were asking right?

borkdude21:10:37

It's building now in CI, commit e31cb57a3db943acd8a37234e48a2b60e7dc7dfc. You can see the binaries coming in in #CSDUA8S6B in a few minutes. Once it's there, you should also be able to install it using:

$ bash <(curl ) --version 1.0.165-SNAPSHOT --dir .

borkdude22:10:18

Should be there now

Jeffrey Bay22:10:31

yep, i got it

borkdude22:10:54

Feel free to come back if something else is missing in java.time

Jeffrey Bay22:10:15

so this works and i was able to solve my problem

Jeffrey Bay22:10:41

i'm not able to push my changes to the rest of the team until i have an actual build though - any idea when that will come?

borkdude22:10:44

I can make a new release tomorrow

Jeffrey Bay22:10:21

oh sweet, that would be great. you're the best, man!