From 1e4c972c3de632303324578d670425de37c1e27a Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 10 Aug 2015 12:35:40 +0100 Subject: [PATCH] Fix customJodaDateTimeFormat to specify time zone when creating Date See gh-3569 --- .../autoconfigure/jackson/JacksonAutoConfigurationTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java index 5986669742..e13d478184 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java @@ -144,7 +144,7 @@ public class JacksonAutoConfigurationTests { ObjectMapper mapper = this.context.getBean(ObjectMapper.class); DateTime dateTime = new DateTime(1988, 6, 25, 20, 30, DateTimeZone.UTC); assertEquals("\"1988-06-25 20:30:00\"", mapper.writeValueAsString(dateTime)); - Date date = new DateTime(1988, 6, 25, 20, 30).toDate(); + Date date = dateTime.toDate(); assertEquals("\"19880625203000\"", mapper.writeValueAsString(date)); }