Skip to content
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

Date formatting behaviour change between 2.6.0 and 2.6.1 #954

Closed
wilkinsona opened this issue Oct 1, 2015 · 2 comments
Closed

Date formatting behaviour change between 2.6.0 and 2.6.1 #954

wilkinsona opened this issue Oct 1, 2015 · 2 comments

Comments

@wilkinsona
Copy link

I believe this is the same problem as FasterXML/jackson-module-scala#222 but I'm opening an issue here as it does not appear to be specific to Scala.

This code behaves differently on 2.6.0 vs 2.6.1:

ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
System.out.println(objectMapper.writeValueAsString(new Date()));

2.6.0 outputs "2015-10-01 14:32:08" whereas 2.6.1 outputs "2015-10-01 13:33:01". My system timezone is set to BST. 2.6.0 produces the correct time for that timezone.

@cowtowncoder
Copy link
Member

@wilkinsona Thank you for reporting this. I have fixed at least one bug that may be close related (or same), regarding handling of configured time zone. If you can test 2.6.3-SNAPSHOT (either built locally from 2.6 branch; or from Sonatype snapshot repo), that could be helpful.

@wilkinsona
Copy link
Author

2.6.3-SNAPSHOT (from the Sonatype repo) looks good to me; it produces the same output as 2.6.0. Thanks.

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

No branches or pull requests

2 participants