You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ki...@apache.org on 2014/01/20 19:37:44 UTC

svn commit: r1559802 - in /commons/proper/lang/trunk/src: changes/changes.xml test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java

Author: kinow
Date: Mon Jan 20 18:37:44 2014
New Revision: 1559802

URL: http://svn.apache.org/r1559802
Log:
[LANG-943] Test DurationFormatUtilsTest.testEdgeDuration fails in JDK 1.6, 1.7 and 1.8, BRST time zone

Modified:
    commons/proper/lang/trunk/src/changes/changes.xml
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java

Modified: commons/proper/lang/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/changes/changes.xml?rev=1559802&r1=1559801&r2=1559802&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/changes/changes.xml [utf-8] (original)
+++ commons/proper/lang/trunk/src/changes/changes.xml [utf-8] Mon Jan 20 18:37:44 2014
@@ -22,6 +22,7 @@
   <body>
 
   <release version="3.3" date="TBA" description="Bugfix and Feature release">
+    <action issue="LANG-943" type="fix" dev="kinow">Test DurationFormatUtilsTest.testEdgeDuration fails in JDK 1.6, 1.7 and 1.8, BRST time zone</action>
     <action issue="LANG-613" type="fix" dev="mbenson">ConstructorUtils.getAccessibleConstructor() Does Not Check the Accessibility of Enclosing Classes</action>
     <action issue="LANG-951" type="fix" dev="britter" due-to="Sebastian Götz">Fragments are wrong by 1 day when using fragment YEAR or MONTH</action>
     <action issue="LANG-417" type="add" dev="britter">New class ClassPathUtils with methods for turning FQN into resource path</action>

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java?rev=1559802&r1=1559801&r2=1559802&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java Mon Jan 20 18:37:44 2014
@@ -430,6 +430,8 @@ public class DurationFormatUtilsTest {
     // Attempting to test edge cases in DurationFormatUtils.formatPeriod
     @Test
     public void testEdgeDurations() {
+        // This test case must use a time zone without DST
+        TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
         assertEqualDuration( "01", new int[] { 2006, 0, 15, 0, 0, 0 }, 
                              new int[] { 2006, 2, 10, 0, 0, 0 }, "MM");
         assertEqualDuration( "12", new int[] { 2005, 0, 15, 0, 0, 0 },