Skip to content

[Java] Use RFC3339 formats for java.util.Date #3727

@cbornet

Description

@cbornet
  • Jackson has an ISO8601Utils class that can be used to easily make a RFC3339DateFormat (or simply use the existing ISO8601Dateformat but it loses the timezone and milliseconds when serializing).
  • Gson has an equivalent UtcDateTypeAdapter For Gson, it's easy to write a TypeAdapter using gson's ISO8601Utils.

These are more performant than SimpleDateFormat and SimpleDateFormat cannot be used on android (since "XXX" pattern is not supported).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions