You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would have expected calling zoned-date-time with a timezone to use java-time.clock/*clock* instead of the system clock. Inspecting the code it looks like the single-arg-zone case for zoned-date-time is just calling (java.time.ZonedDateTime/now zone) which uses the system clock according to the documentation.
There's a similar issue with offset-date-time and offset-time and maybe others, I didn't inspect everything.
The text was updated successfully, but these errors were encountered:
frenchy64
changed the title
zoned-date-time with a singe argument does not use java-time.clock/makezoned-date-time with a single argument does not use java-time.clock/makeAug 11, 2023
If I establish a clock with
with-clock
and callzoned-date-time
with zero args I get the value from the clock:However, if I specify only a timezone, it uses the system clock:
I can work around this by constructing a
zoned-date-time
with zero args and passing that tozoned-date-time
with a zone:I would have expected calling
zoned-date-time
with a timezone to usejava-time.clock/*clock*
instead of the system clock. Inspecting the code it looks like the single-arg-zone case forzoned-date-time
is just calling(java.time.ZonedDateTime/now zone)
which uses the system clock according to the documentation.There's a similar issue with
offset-date-time
andoffset-time
and maybe others, I didn't inspect everything.The text was updated successfully, but these errors were encountered: