Closed AngeloStavrow closed 2 years ago
Without doing more digging yet, I'm not sure why sub-second datetimes are being stored for these WriteFreely instances. But as mentioned in this SO answer, the Go JSON library will always output times according to RFC3339, with sub-seconds if they're present.
So while we wait for a fix in WF (and for it to be widely deployed), I definitely think the library should be able to handle this behavior, since it still adheres to the standard (although the behavior is undesired).
I've put together a quick PR for WF, but as you say it will take a while for it to be fully deployed. https://github.com/writefreely/writefreely/pull/585
This is related to writefreely/writefreely-swiftui-multiplatform#200 where, if the WriteFreely instance returns dates with fractional seconds (e.g.,
2022-09-28T11:55:39.886581893Z
), the date-decoding strategy fails and an error is thrown.A potential solution has been added in a note to this comment in the Vapor repo.