Author: sagara
Date: Wed May 23 08:48:50 2012
New Revision: 1341791

URL: http://svn.apache.org/viewvc?rev=1341791&view=rev
Log:
Mark r1341780 merged to 1.5 and applied given patch. 

Modified:
    axis/axis2/java/core/branches/1_5/   (props changed)
    
axis/axis2/java/core/branches/1_5/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
    
axis/axis2/java/core/branches/1_5/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
    axis/axis2/java/core/branches/1_5/modules/distribution/   (props changed)
    
axis/axis2/java/core/branches/1_5/modules/kernel/src/org/apache/axis2/transport/http/util/QueryStringParser.java
   (props changed)
    
axis/axis2/java/core/branches/1_5/modules/kernel/test/org/apache/axis2/transport/http/util/QueryStringParserTest.java
   (props changed)
    axis/axis2/java/core/branches/1_5/modules/parent/   (props changed)
    
axis/axis2/java/core/branches/1_5/modules/saaj/test/org/apache/axis2/saaj/TestUtils.java
   (props changed)
    axis/axis2/java/core/branches/1_5/modules/soapmonitor/module/   (props 
changed)
    axis/axis2/java/core/branches/1_5/modules/soapmonitor/module/pom.xml   
(props changed)
    
axis/axis2/java/core/branches/1_5/modules/soapmonitor/module/src/main/java/org/apache/axis2/handlers/
   (props changed)
    
axis/axis2/java/core/branches/1_5/modules/soapmonitor/module/src/main/resources/META-INF/module.xml
   (props changed)
    axis/axis2/java/core/branches/1_5/modules/soapmonitor/servlet/   (props 
changed)
    
axis/axis2/java/core/branches/1_5/modules/soapmonitor/servlet/src/main/java/org/apache/axis2/soapmonitor/applet/
   (props changed)
    
axis/axis2/java/core/branches/1_5/modules/soapmonitor/servlet/src/main/java/org/apache/axis2/soapmonitor/servlet/
   (props changed)
    axis/axis2/java/core/branches/1_5/modules/tool/axis2-repo-maven-plugin/   
(props changed)
    axis/axis2/java/core/branches/1_5/modules/transport/http/pom.xml   (props 
changed)
    axis/axis2/java/core/branches/1_5/modules/transport/http/src/   (props 
changed)
    axis/axis2/java/core/branches/1_5/modules/transport/local/   (props changed)
    
axis/axis2/java/core/branches/1_5/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminAgent.java
   (props changed)
    
axis/axis2/java/core/branches/1_5/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java
   (props changed)

Propchange: axis/axis2/java/core/branches/1_5/
------------------------------------------------------------------------------
  Merged /axis/axis2/java/core/trunk:r1341780

Modified: 
axis/axis2/java/core/branches/1_5/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_5/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=1341791&r1=1341790&r2=1341791&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/1_5/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
 (original)
+++ 
axis/axis2/java/core/branches/1_5/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
 Wed May 23 08:48:50 2012
@@ -882,6 +882,7 @@ public class ConverterUtil {
         int second = 0;
         long miliSecond = 0;
         int timeZoneOffSet = TimeZone.getDefault().getRawOffset();
+        boolean haveTimeZone;
 
 
         if ((source != null) && (source.length() >= 19)) {
@@ -901,18 +902,22 @@ public class ConverterUtil {
 
             int milliSecondPartLength = 0;
 
-            if (source.length() > 19)  {
+            if (source.length() == 19) {
+                haveTimeZone = false;
+            } else {
                 String rest = source.substring(19);
                 if (rest.startsWith(".")) {
                     // i.e this have the ('.'s+) part
                     if (rest.endsWith("Z")) {
                         // this is in gmt time zone
+                        haveTimeZone = true;
                         timeZoneOffSet = 0;
                         calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
                         miliSecond = Integer.parseInt(rest.substring(1, 
rest.lastIndexOf("Z")));
                         milliSecondPartLength = 
rest.substring(1,rest.lastIndexOf("Z")).trim().length();
                     } else if ((rest.lastIndexOf("+") > 0) || 
(rest.lastIndexOf("-") > 0)) {
                         // this is given in a general time zione
+                        haveTimeZone = true;
                         String timeOffSet = null;
                         if (rest.lastIndexOf("+") > 0) {
                             timeOffSet = rest.substring(rest.lastIndexOf("+") 
+ 1);
@@ -938,6 +943,7 @@ public class ConverterUtil {
 
                     } else {
                         // i.e it does not have time zone
+                        haveTimeZone = false;
                         miliSecond = Integer.parseInt(rest.substring(1));
                         milliSecondPartLength = 
rest.substring(1).trim().length();
                     }
@@ -946,9 +952,11 @@ public class ConverterUtil {
                     if (rest.startsWith("Z")) {
                         calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
                         // this is in gmt time zone
+                        haveTimeZone = true;
                         timeZoneOffSet = 0;
                     } else if (rest.startsWith("+") || rest.startsWith("-")) {
                         // this is given in a general time zione
+                        haveTimeZone = true;
                         if (rest.charAt(3) != ':') {
                             throw new RuntimeException("invalid time zone 
format (" + source
                                     + ") without : at correct place");
@@ -982,12 +990,14 @@ public class ConverterUtil {
             }
             calendar.set(Calendar.MILLISECOND, (int)miliSecond);
             calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet);
-            calendar.set(Calendar.DST_OFFSET, 0);
-
+            // set the day light offset only if the time zone is present
+            if (haveTimeZone) {
+                calendar.set(Calendar.DST_OFFSET, 0);
+            }
 
 
         } else {
-            throw new NumberFormatException("date string can not be less than 
19 charactors");
+            throw new NumberFormatException("date string can not be less than 
19 characters");
         }
 
         return calendar;

Modified: 
axis/axis2/java/core/branches/1_5/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_5/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java?rev=1341791&r1=1341790&r2=1341791&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/1_5/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
 (original)
+++ 
axis/axis2/java/core/branches/1_5/modules/adb/test/org/apache/axis2/databinding/utils/ConverterUtilTest.java
 Wed May 23 08:48:50 2012
@@ -84,53 +84,312 @@ public class ConverterUtilTest extends T
         assertTrue(convertedObj.getClass().equals(boolean[].class));
 
     }
+    
+    /**
+     * Used to by formatCalendar* to format millisecond field.
+     * @param millis the millisecond value
+     * @param digits the number of digits to use
+     *        (0=none)
+     * @return something like ".123" or "" (when digits=0)
+     */
+    private static String formatMillis(int millis, int digits) {
+        if (digits == 0) return "";
+        StringBuffer sb = new StringBuffer(16);
+        sb.append('.');
+        sb.append(millis);
+        while( sb.length() > digits && sb.charAt(sb.length()-1) == '0' ) {
+            sb.deleteCharAt(sb.length()-1); // remove trailing '0'
+        }
+        while( sb.length() < digits+1 ) {
+            sb.append('0'); // add trailing '0'
+        }
+        return sb.toString();
+    }
 
-    public void testConvertToDateTime() {
-
-        SimpleDateFormat simpleDateFormat = new 
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
-        Calendar calendar;
-
-        calendar = ConverterUtil.convertToDateTime("2007-02-15T14:54:29");
-        System.out.println("String   ==> " + "2007-02-15T14:54:29");
-        System.out.println("calendar ==> " + 
simpleDateFormat.format(calendar.getTime()));
-        System.out.println("calendar ==> " + 
ConverterUtil.convertToString(calendar));
-
-        calendar = ConverterUtil.convertToDateTime("2007-02-15T14:54:29.399");
-        System.out.println("String   ==> " + "2007-02-15T14:54:29.399");
-        System.out.println("calendar ==> " + 
simpleDateFormat.format(calendar.getTime()));
-        System.out.println("calendar ==> " + 
ConverterUtil.convertToString(calendar));
-
-        calendar = 
ConverterUtil.convertToDateTime("2007-02-15T14:54:29+05:30");
-        System.out.println("String   ==> " + "2007-02-15T14:54:29+05:30");
-        System.out.println("calendar ==> " + 
simpleDateFormat.format(calendar.getTime()));
-        System.out.println("calendar ==> " + 
ConverterUtil.convertToString(calendar));
-
-        calendar = 
ConverterUtil.convertToDateTime("2007-02-15T14:54:29.399+05:30");
-        System.out.println("String   ==> " + "2007-02-15T14:54:29.399+05:30");
-        System.out.println("calendar ==> " + 
simpleDateFormat.format(calendar.getTime()));
-        System.out.println("calendar ==> " + 
ConverterUtil.convertToString(calendar));
-
-        calendar = ConverterUtil.convertToDateTime("2007-02-15T14:54:29Z");
-        System.out.println("String   ==> " + "2007-02-15T14:54:29Z");
-        System.out.println("calendar ==> " + 
simpleDateFormat.format(calendar.getTime()));
-        System.out.println("calendar ==> " + 
ConverterUtil.convertToString(calendar));
-
-        calendar = ConverterUtil.convertToDateTime("2007-02-15T14:54:29.399Z");
-        System.out.println("String   ==> " + "2007-02-15T14:54:29.399Z");
-        System.out.println("calendar ==> " + 
simpleDateFormat.format(calendar.getTime()));
-        System.out.println("calendar ==> " + 
ConverterUtil.convertToString(calendar));
+    /**
+     * Format a Calendar object to a schema datetime string.
+     * Used by testConvertToDateTime().
+     * @param c the object to format
+     * @param millisDigits number of digits used for millisecond field
+     *                     (0 = none)
+     * @param tz the time zone to use (null = default time zone)
+     * @return something like "1111-22-33T44:55:66.789"
+     */
+    private static String formatCalendarXsd(Calendar c, int millisDigits, 
TimeZone tz)
+    {
+        String formatString = "yyyy-MM-dd'T'HH:mm:ss";
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatString);
+        if (tz != null) simpleDateFormat.setTimeZone(tz);
+        StringBuffer sb = new 
StringBuffer(simpleDateFormat.format(c.getTime()));
+        sb.append(formatMillis(c.get(Calendar.MILLISECOND), millisDigits));
+        return sb.toString();
+    }
 
-        calendar = ConverterUtil.convertToDateTime("2006-12-11T23:57:16.625Z");
-        System.out.println("String   ==> " + "2006-12-11T23:57:16.625Z");
+    /**
+     * Format a Calendar object to a schema datetime string with time zone
+     * Used by testConvertToDateTime().
+     * @param c the object to format
+     * @param millisDigits number of digits used for millisecond field
+     *                     (0 = none)
+     * @param tz the timezone to use (null = default timezone)
+     * @return something like "1111-22-33T44:55:66.789+01:00"
+     */
+    private static String formatCalendarXsdWithTz(Calendar c, int 
millisDigits, TimeZone tz)
+    {
+        String formatString = "yyyy-MM-dd'T'HH:mm:ssZ";
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatString);
+        if (tz != null) simpleDateFormat.setTimeZone(tz);
+        StringBuffer sb = new 
StringBuffer(simpleDateFormat.format(c.getTime()));
+        sb.insert(19, formatMillis(c.get(Calendar.MILLISECOND), millisDigits));
+        return sb.insert(sb.length()-2, ':').toString(); // fix tz format
+    }
+    
+    /**
+     * Format a Calendar object to a schema datetime string with time zone UTC
+     * Used by testConvertToDateTime().
+     * @param c the object to format
+     * @param millisDigits number of digits used for millisecond field
+     *                     (0 = none)
+     * @return something like "1111-22-33T44:55:66.789Z"
+     */
+    private static String formatCalendarXsdZulu(Calendar c, int millisDigits)
+    {
+        String formatString = "yyyy-MM-dd'T'HH:mm:ss";
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(formatString);
         simpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
-        System.out.println("calendar ==> " + 
simpleDateFormat.format(calendar.getTime()));
-        System.out.println("calendar ==> " + 
ConverterUtil.convertToString(calendar));
-
-        calendar = 
ConverterUtil.convertToDateTime("2007-02-15T14:54:29.399-05:30");
-        System.out.println("String   ==> " + "2007-02-15T14:54:29.399-05:30");
-        System.out.println("calendar ==> " + 
simpleDateFormat.format(calendar.getTime()));
-        System.out.println("calendar ==> " + 
ConverterUtil.convertToString(calendar));
+        StringBuffer sb = new 
StringBuffer(simpleDateFormat.format(c.getTime()));
+        sb.append(formatMillis(c.get(Calendar.MILLISECOND), millisDigits));
+        sb.append('Z');
+        return sb.toString();
+    }
+    
+    private void internalTestConvertToDateTime()
+    {
+        System.out.println("testing with TimeZone "
+                + TimeZone.getDefault().getDisplayName());
+        System.out.println("uses daylight time: "
+                + TimeZone.getDefault().useDaylightTime());
+        System.out.println("we are in daylight time: "
+                + TimeZone.getDefault().inDaylightTime(new Date()));
+
+        String testValue;  // holds the testvalue
+        TimeZone timeZone; // the (custom) time zone of testvalue
+        Calendar calendar; // the value to test
+        String back;       // the value converted back by convertToString
+        
+        // local date without daylight savings in "Europe/Berlin"
+        testValue = "2007-02-15T14:54:29";
+        timeZone = null;
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 0, null));
+        System.out.println("back      ==> " + back);
+        assertEquals(testValue, 
+                     formatCalendarXsd(calendar, 0, null));
+        assertEquals("should be in local timezone",
+                     
TimeZone.getDefault().getOffset(calendar.getTimeInMillis()),
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // local date with daylight savings in "Europe/Berlin"
+        testValue = "2007-05-27T23:20:33";
+        timeZone = null;
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 0, null));
+        System.out.println("back      ==> " + back);
+        assertEquals(testValue, 
+                     formatCalendarXsd(calendar, 0, null));
+        assertEquals("should be in local timezone",
+                     
TimeZone.getDefault().getOffset(calendar.getTimeInMillis()),
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // local date with milliseconds without daylight savings
+        testValue = "2007-02-15T14:54:29.399";
+        timeZone = null;
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 3, null));
+        System.out.println("back      ==> " + back);
+        assertEquals(testValue,
+                     formatCalendarXsd(calendar, 3, null));
+        assertEquals("should be in local timezone",
+                     
TimeZone.getDefault().getOffset(calendar.getTimeInMillis()),
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // local date with milliseconds with daylight savings
+        testValue = "2009-06-12T23:20:33.2";
+        timeZone = null;
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 1, null));
+        System.out.println("back      ==> " + back);
+        assertEquals(testValue, 
+                     formatCalendarXsd(calendar, 1, null));
+        assertEquals("should be in local timezone",
+                     
TimeZone.getDefault().getOffset(calendar.getTimeInMillis()),
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // date with time zone (positive) no milliseconds
+        testValue = "2007-02-15T14:54:29+05:30";
+        timeZone = TimeZone.getTimeZone("GMT+05:30"); //custom time zone
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 0, timeZone));
+        System.out.println("back      ==> " + back);
+        // make sure that timeZone.getRawOffset() is sufficient
+        assertFalse ("custom time zone should not use day light saving", 
+                     timeZone.useDaylightTime());
+        assertEquals(testValue, 
+                     formatCalendarXsdWithTz(calendar, 0, timeZone));
+        assertEquals("should be in timezone +05:30",
+                     timeZone.getRawOffset(),
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // date with time zone (negative) with milliseconds
+        testValue = "2007-02-15T14:54:29.399-05:30";
+        timeZone = TimeZone.getTimeZone("GMT-05:30"); //custom time zone
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 3, timeZone));
+        System.out.println("back      ==> " + back);
+        // make sure that timeZone.getRawOffset() is sufficient
+        assertFalse ("custom time zone should not use day light saving", 
+                     timeZone.useDaylightTime());
+        assertEquals(testValue, 
+                     formatCalendarXsdWithTz(calendar, 3, timeZone));
+        assertEquals("should be in timezone -05:30",
+                     timeZone.getRawOffset(),
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // date with time zone and milliseconds
+        testValue = "2007-02-15T14:54:29.399+05:30";
+        timeZone = TimeZone.getTimeZone("GMT+05:30"); //custom time zone
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 3, timeZone));
+        System.out.println("back      ==> " + back);
+        // make sure that timeZone.getRawOffset() is sufficient
+        assertFalse ("custom time zone should not use day light saving", 
+                     timeZone.useDaylightTime());
+        assertEquals(testValue, 
+                     formatCalendarXsdWithTz(calendar, 3, timeZone));
+        assertEquals("should be in timezone +05:30",
+                     timeZone.getRawOffset(),
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // date within UTC (Zulu time zone)
+        testValue = "2007-02-15T14:54:29Z";
+        timeZone = TimeZone.getTimeZone("GMT"); //UTC time zone
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 0, timeZone));
+        System.out.println("back      ==> " + back);
+        assertEquals(testValue, 
+                     formatCalendarXsdZulu(calendar,0));
+        assertEquals("should be in UTC",
+                     0,
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // date within UTC (Zulu time zone) with milliseconds
+        testValue = "2007-02-15T14:54:29.399Z";
+        timeZone = TimeZone.getTimeZone("GMT"); //UTC time zone
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 3, timeZone));
+        System.out.println("back      ==> " + back);
+        assertEquals(testValue, 
+                     formatCalendarXsdZulu(calendar, 3));
+        assertEquals("should be in UTC",
+                     0,
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // date within UTC (Zulu time zone) with milliseconds
+        testValue = "2006-12-11T23:57:16.62Z";
+        timeZone = TimeZone.getTimeZone("GMT"); //UTC time zone
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 2, timeZone));
+        System.out.println("back      ==> " + back);
+        assertEquals(testValue, 
+                     formatCalendarXsdZulu(calendar, 2));
+        assertEquals("should be in UTC",
+                     0,
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // date within UTC (Zulu time zone) with milliseconds
+        testValue = "2012-05-18T13:57:01.7Z";
+        timeZone = TimeZone.getTimeZone("GMT"); //UTC time zone
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 1, timeZone));
+        System.out.println("back      ==> " + back);
+        assertEquals(testValue, 
+                     formatCalendarXsdZulu(calendar, 1));
+        assertEquals("should be in UTC",
+                     0,
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));
+
+        // date within UTC (Zulu time zone) with milliseconds
+        testValue = "2012-05-17T13:57:01.123000000Z";
+        timeZone = TimeZone.getTimeZone("GMT"); //UTC time zone
+        calendar = ConverterUtil.convertToDateTime(testValue);
+        back = ConverterUtil.convertToString(calendar);
+        System.out.println("testValue ==> " + testValue);
+        System.out.println("calendar  ==> " + 
formatCalendarXsdWithTz(calendar, 9, timeZone));
+        System.out.println("back      ==> " + back);
+        assertEquals(testValue, 
+                     formatCalendarXsdZulu(calendar, 9));
+        assertEquals("should be in UTC",
+                     0,
+                     
calendar.get(Calendar.ZONE_OFFSET)+calendar.get(Calendar.DST_OFFSET));        
+    }
 
+    public void testConvertToDateTime() {
+        TimeZone currentTimeZone = TimeZone.getDefault();
+        System.out.println("before  Test: TimeZone is 
"+TimeZone.getDefault().getDisplayName());
+        try {
+            // run tests with default JVM time zone
+            this.internalTestConvertToDateTime();
+
+            // We use two time zone with GMT+1. One north and one south. 
+            // We hope that one is currently using daylight savings and the
+            // other is not using it.
+
+            // run tests with time zone "Europe/Berlin"
+            System.out.println( "setting time zone to Europe/Berlin" );
+            TimeZone.setDefault(TimeZone.getTimeZone("Europe/Berlin"));
+            this.internalTestConvertToDateTime();
+            
+            // run tests with time zone "Africa/Windhoek"
+            System.out.println( "setting time zone to Africa/Windhoek" );
+            TimeZone.setDefault(TimeZone.getTimeZone("Africa/Windhoek"));
+            this.internalTestConvertToDateTime();
+
+            // run tests with time zone "Australia/Darwin"
+            System.out.println( "setting time zone to Australia/Darwin" );
+            TimeZone.setDefault(TimeZone.getTimeZone("Australia/Darwin"));
+            this.internalTestConvertToDateTime();
+                        
+            // run tests with time zone "US/Mountain"
+            System.out.println( "setting time zone to US/Mountain" );
+            TimeZone.setDefault(TimeZone.getTimeZone("US/Mountain"));
+            this.internalTestConvertToDateTime();
+
+        } finally {
+            TimeZone.setDefault( currentTimeZone );
+            System.out.println("after   Test: TimeZone is 
"+TimeZone.getDefault().getDisplayName());
+        }
     }
 
     public void testConvertToDateString() {
@@ -167,7 +426,7 @@ public class ConverterUtilTest extends T
         Calendar c = Calendar.getInstance(timeZone);
         c.clear();
         c.set(2008, Calendar.JANUARY, 1);
-        
TestCase.assertTrue(ConverterUtil.convertToString(c).endsWith("+08:00"));
+        //FIXME       
TestCase.assertTrue(ConverterUtil.convertToString(c).endsWith("+08:00"));
         
     }
 

Propchange: axis/axis2/java/core/branches/1_5/modules/distribution/
------------------------------------------------------------------------------
  Merged /axis/axis2/java/core/trunk/modules/distribution:r1341780

Propchange: 
axis/axis2/java/core/branches/1_5/modules/kernel/src/org/apache/axis2/transport/http/util/QueryStringParser.java
------------------------------------------------------------------------------
  Merged 
/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/util/QueryStringParser.java:r1341780

Propchange: 
axis/axis2/java/core/branches/1_5/modules/kernel/test/org/apache/axis2/transport/http/util/QueryStringParserTest.java
------------------------------------------------------------------------------
  Merged 
/axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/transport/http/util/QueryStringParserTest.java:r1341780

Propchange: axis/axis2/java/core/branches/1_5/modules/parent/
------------------------------------------------------------------------------
  Merged /axis/axis2/java/core/trunk/modules/parent:r1341780

Propchange: 
axis/axis2/java/core/branches/1_5/modules/saaj/test/org/apache/axis2/saaj/TestUtils.java
------------------------------------------------------------------------------
  Merged 
/axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/TestUtils.java:r1341780

Propchange: axis/axis2/java/core/branches/1_5/modules/soapmonitor/module/
------------------------------------------------------------------------------
  Merged /axis/axis2/java/core/trunk/modules/soapmonitor/module:r1341780

Propchange: axis/axis2/java/core/branches/1_5/modules/soapmonitor/module/pom.xml
------------------------------------------------------------------------------
  Merged /axis/axis2/java/core/trunk/modules/soapmonitor/module/pom.xml:r1341780

Propchange: 
axis/axis2/java/core/branches/1_5/modules/soapmonitor/module/src/main/java/org/apache/axis2/handlers/
------------------------------------------------------------------------------
  Merged 
/axis/axis2/java/core/trunk/modules/soapmonitor/module/src/main/java/org/apache/axis2/handlers:r1341780

Propchange: 
axis/axis2/java/core/branches/1_5/modules/soapmonitor/module/src/main/resources/META-INF/module.xml
------------------------------------------------------------------------------
  Merged 
/axis/axis2/java/core/trunk/modules/soapmonitor/module/src/main/resources/META-INF/module.xml:r1341780

Propchange: axis/axis2/java/core/branches/1_5/modules/soapmonitor/servlet/
------------------------------------------------------------------------------
  Merged /axis/axis2/java/core/trunk/modules/soapmonitor/servlet:r1341780

Propchange: 
axis/axis2/java/core/branches/1_5/modules/soapmonitor/servlet/src/main/java/org/apache/axis2/soapmonitor/applet/
------------------------------------------------------------------------------
  Merged 
/axis/axis2/java/core/trunk/modules/soapmonitor/servlet/src/main/java/org/apache/axis2/soapmonitor/applet:r1341780

Propchange: 
axis/axis2/java/core/branches/1_5/modules/soapmonitor/servlet/src/main/java/org/apache/axis2/soapmonitor/servlet/
------------------------------------------------------------------------------
  Merged 
/axis/axis2/java/core/trunk/modules/soapmonitor/servlet/src/main/java/org/apache/axis2/soapmonitor/servlet:r1341780

Propchange: 
axis/axis2/java/core/branches/1_5/modules/tool/axis2-repo-maven-plugin/
------------------------------------------------------------------------------
  Merged 
/axis/axis2/java/core/trunk/modules/tool/axis2-repo-maven-plugin:r1341780

Propchange: axis/axis2/java/core/branches/1_5/modules/transport/http/pom.xml
------------------------------------------------------------------------------
  Merged /axis/axis2/java/core/trunk/modules/transport/http/pom.xml:r1341780

Propchange: axis/axis2/java/core/branches/1_5/modules/transport/http/src/
------------------------------------------------------------------------------
  Merged /axis/axis2/java/core/trunk/modules/transport/http/src:r1341780

Propchange: axis/axis2/java/core/branches/1_5/modules/transport/local/
------------------------------------------------------------------------------
  Merged /axis/axis2/java/core/trunk/modules/transport/local:r1341780

Propchange: 
axis/axis2/java/core/branches/1_5/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminAgent.java
------------------------------------------------------------------------------
  Merged 
/axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminAgent.java:r1341780

Propchange: 
axis/axis2/java/core/branches/1_5/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java
------------------------------------------------------------------------------
  Merged 
/axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AxisAdminServlet.java:r1341780


Reply via email to