Liking cljdoc? Tell your friends :D

Time Zones & Offset

Extract a zone from a java.time.ZonedDateTime:

(t/zone (t/zoned-date-time "2000-01-01T00:00:00Z[Europe/Paris]"))
(t/zone)

Create a java.time.ZonedDateTime in a particular time zone:

(t/in (t/instant "2000-01-01T00:00") "Australia/Darwin")

Give the OffsetDateTime instead of ZonedDateTime:

(t/offset-date-time (t/zoned-date-time "2000-01-01T00:00:00Z[Australia/Darwin]"))

Specify the offset for a LocalDateTime:

(t/offset-by (t/date-time "2018-01-01T00:00") 9)

Can you improve this documentation? These fine people already did:
Johanna Antonelli & Malcolm Sparks
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close