Class RichDateTimeXmlAdapter


  • @StableMinor(version="16.0",
                 sinceVersion="8.0")
    public class RichDateTimeXmlAdapter
    extends XmlAdapter<RichDateTimeXmlAdapter.RichDateTime,​java.util.Date>
    Adapter for a richer date-time format for use in JAXB. Outputs in ISO-8601, timeInMillis (milliseconds since January 1, 1970, 00:00:00 GMT) and user's locale default format. Accepts input in ISO-8601 and timeInMillis.

    Sample date output in JSON:

    {"iso":"2014-09-08T15:29:34.251-03:00","timeInMillis":1410200974251,"formatted":"08/09/14 15:29"}

    Sample date input formats in JSON:

    • {"iso":"2014-09-08T15:29:34.251-03:00"}
    • {"timeInMillis":1410200974251}
    • "2014-09-08T15:29:34.251-03:00"
    • 1410200974251
    Since:
    8.0.0
    Version:
    $Revision: 25808 $ $Date: 2023-07-04 15:20:55 -0300 (Tue, 04 Jul 2023) $