I am trying to ensure that calling toString()
on my ZonedDateTime
Object will comply with ISO-8601 format.
The documentation for the toSt
As per the official documentation:
Obtaining the offset for an instant is simple, as there is exactly one valid offset for each instant. By contrast, obtaining the offset for a local date-time is not straightforward. There are three cases:
So the 2nd and 3rd case are the situations where toString() will not be ISO-8601 compliant.