18
18
19
19
import static org .junit .jupiter .api .Assertions .assertEquals ;
20
20
import static org .junit .jupiter .api .Assertions .assertNotEquals ;
21
+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
21
22
import static org .junit .jupiter .api .Assertions .assertNotSame ;
22
23
import static org .junit .jupiter .api .Assertions .assertSame ;
23
24
import static org .junit .jupiter .api .Assertions .fail ;
24
25
25
26
import java .text .FieldPosition ;
26
27
import java .text .Format ;
28
+ import java .text .ParseException ;
27
29
import java .text .ParsePosition ;
28
30
import java .text .SimpleDateFormat ;
29
31
import java .time .Instant ;
@@ -258,11 +260,11 @@ public void testLang1152() {
258
260
dateAsString = FastDateFormat .getInstance ("dd/MM/yyyy" , utc , Locale .US ).format (date );
259
261
assertEquals ("17/08/292278994" , dateAsString );
260
262
}
263
+
261
264
@ Test
262
265
public void testLang1267 () {
263
266
FastDateFormat .getInstance ("yyyy-MM-dd'T'HH:mm:ss.SSSXXX" );
264
267
}
265
-
266
268
@ Test
267
269
public void testLang1641 () {
268
270
assertSame (FastDateFormat .getInstance (ISO_8601_DATE_FORMAT ), FastDateFormat .getInstance (ISO_8601_DATE_FORMAT ));
@@ -286,6 +288,18 @@ public void testLang954() {
286
288
FastDateFormat .getInstance (pattern );
287
289
}
288
290
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
+
289
303
@ Test
290
304
public void testParseSync () throws InterruptedException {
291
305
final String pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS" ;
0 commit comments