Skip to content

Change default setting for Date serialization to include colon #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cowtowncoder opened this issue Sep 8, 2017 · 1 comment
Closed

Comments

@cowtowncoder
Copy link
Member

Jackson 2.x serializes java.util.Date and java.util.Calendar using format where timezone offset does not include colon; for example:

2017-01-04T15:00:00-0800

but Java 8 serialization and Joda add colon:

2017-01-04T15:00:00-08:00

and it sounds like latter is the way things should work wrt "basic" (or compact?) vs "extended" notations -- omitting colon would require omitting of colons and hyphens more generally.

Since Jackson uses its own StdDateFormat for serialization it is easy to change default formatting and add colon. Now (2.x -> 3.0) would be good time to do this, since it is a small but highly visible change to defaults.

@cowtowncoder
Copy link
Member Author

Implemented in jackson-databind, modified tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant