1818
1919import static org .junit .jupiter .api .Assertions .assertEquals ;
2020import static org .junit .jupiter .api .Assertions .assertNotEquals ;
21+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
2122import static org .junit .jupiter .api .Assertions .assertNotSame ;
2223import static org .junit .jupiter .api .Assertions .assertSame ;
2324import static org .junit .jupiter .api .Assertions .fail ;
2425
2526import java .text .FieldPosition ;
2627import java .text .Format ;
28+ import java .text .ParseException ;
2729import java .text .ParsePosition ;
2830import java .text .SimpleDateFormat ;
2931import java .time .Instant ;
@@ -258,11 +260,11 @@ public void testLang1152() {
258260 dateAsString = FastDateFormat .getInstance ("dd/MM/yyyy" , utc , Locale .US ).format (date );
259261 assertEquals ("17/08/292278994" , dateAsString );
260262 }
263+
261264 @ Test
262265 public void testLang1267 () {
263266 FastDateFormat .getInstance ("yyyy-MM-dd'T'HH:mm:ss.SSSXXX" );
264267 }
265-
266268 @ Test
267269 public void testLang1641 () {
268270 assertSame (FastDateFormat .getInstance (ISO_8601_DATE_FORMAT ), FastDateFormat .getInstance (ISO_8601_DATE_FORMAT ));
@@ -286,6 +288,18 @@ public void testLang954() {
286288 FastDateFormat .getInstance (pattern );
287289 }
288290
291+ /**
292+ * Tests [LANG-1767] FastDateFormat.parse can not recgnoize "CEST" Timezone.
293+ *
294+ * @throws ParseException Throws on test failure.
295+ */
296+ @ Test
297+ public void testParseCentralEuropeanSummerTime () throws ParseException {
298+ assertNotNull (FastDateFormat .getInstance ("dd.MM.yyyy HH:mm:ss" , Locale .GERMANY ).parse ("26.10.2014 02:00:00" ));
299+ assertNotNull (FastDateFormat .getInstance ("dd.MM.yyyy HH:mm:ss z" , Locale .US ).parse ("26.10.2014 02:00:00 CEST" ));
300+ assertNotNull (FastDateFormat .getInstance ("dd.MM.yyyy HH:mm:ss z" , Locale .GERMANY ).parse ("26.10.2014 02:00:00 MESZ" ));
301+ }
302+
289303 @ Test
290304 public void testParseSync () throws InterruptedException {
291305 final String pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS" ;
0 commit comments