Hi, I have a problem setting a cookie with "expires" attribute
(assoc (response/ok)
:cookies {"hehe" {:expires "2022-10-14T03:26:52.000Z"
:value "eheheeheh"}})
Using this code, the cookie gets set, but the "expires" attribute is just ignored. Why does this happen? How can I debug it? I use default ring middlewareBrowser is likely ignoring the date because it is not the right format for cookies
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie has a section on expires with a link to a place that talks about how those dates are formatted
If joda time is available, ring also supports passing a joda datetime instead of a string, and you can see how it formats those https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/middleware/cookies.clj#L84
Oh, it supports a java.time zoneddatetime, so just use one of those https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/middleware/cookies.clj#L101
yeah, ZonedDateTime worked. Thank you, I've spent a few hours trying different things, going through source code before asking (╯ ͡° ͜ʖ ͡°)╯︵ ┻━┻