From 8837a12608d2b2296d73f24bde4f200ac211820e Mon Sep 17 00:00:00 2001 From: eric-martin Date: Thu, 25 Oct 2018 23:47:46 -0500 Subject: [PATCH] Fixed SimpleDateFormatUnitTest --- .../baeldung/simpledateformat/SimpleDateFormatUnitTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java b/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java index ba4ea32e21..4ae7b77089 100644 --- a/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java +++ b/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung; +package com.baeldung.simpledateformat; import org.junit.Test; @@ -32,6 +32,7 @@ public class SimpleDateFormatUnitTest { @Test public void givenStringDate_whenParsed_thenCheckDateCorrect() throws Exception{ SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); + formatter.setTimeZone(TimeZone.getTimeZone("Europe/London")); Date myDate = new Date(233276400000L); Date parsedDate = formatter.parse("24-05-1977"); assertEquals(myDate.getTime(), parsedDate.getTime());