< prev index next >

test/java/time/tck/java/time/format/TCKDTFParsedInstant.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -28,10 +28,11 @@
 import java.time.OffsetDateTime;
 import java.time.ZoneId;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatter;
+import java.util.Locale;
 
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 

@@ -192,11 +193,11 @@
         };
     }
 
     @Test(dataProvider="parseWithZoneWithoutOffset")
     public void testWithZoneWithoutOffset(String withZoneWithoutOffset, ZonedDateTime expectedZDT) {
-        dtFormatter = DateTimeFormatter.ofPattern("d MMM HH:mm:ss uuuu VV");
+        dtFormatter = DateTimeFormatter.ofPattern("d MMM HH:mm:ss uuuu VV").withLocale(Locale.ENGLISH);
         zdt1 = ZonedDateTime.parse(withZoneWithoutOffset, dtFormatter);
         assertEquals(expectedZDT, zdt1);
     }
 
     @DataProvider(name="parseWithOffsetWithoutZone")
< prev index next >