axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r676609 - in /webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding: types/Time.java utils/ConverterUtil.java
Date Mon, 14 Jul 2008 14:48:16 GMT
Author: dims
Date: Mon Jul 14 07:48:15 2008
New Revision: 676609

URL: http://svn.apache.org/viewvc?rev=676609&view=rev
Log:
Patch from Amila (via email on axis-dev) replacing the reverted code

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Time.java
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Time.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Time.java?rev=676609&r1=676608&r2=676609&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Time.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/types/Time.java
Mon Jul 14 07:48:15 2008
@@ -99,7 +99,6 @@
         source = source.trim();
 
         Calendar calendar = Calendar.getInstance();
-        int dsTimeOffset = calendar.get(Calendar.DST_OFFSET);
         calendar.clear();
         int hour = 0;
         int minite = 0;
@@ -196,9 +195,8 @@
             }
         }
         calendar.set(Calendar.MILLISECOND, miliSecond);
-
-        calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet - dsTimeOffset);
-        calendar.set(Calendar.DST_OFFSET, dsTimeOffset);
+        calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet);
+        calendar.set(Calendar.DST_OFFSET, 0);
 
         return calendar;
     }

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java?rev=676609&r1=676608&r2=676609&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/ConverterUtil.java
Mon Jul 14 07:48:15 2008
@@ -608,14 +608,13 @@
         }
 
         Calendar calendar = Calendar.getInstance();
-        int dsTimeOffset = calendar.get(Calendar.DST_OFFSET);
         calendar.clear();
         calendar.set(Calendar.YEAR, year);
         //xml month stars from the 1 and calendar month is starts with 0
         calendar.set(Calendar.MONTH, month - 1);
         calendar.set(Calendar.DAY_OF_MONTH, day);
-        calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet - dsTimeOffset);
-        calendar.set(Calendar.DST_OFFSET, dsTimeOffset);
+        calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet);
+        calendar.set(Calendar.DST_OFFSET, 0);
         calendar.getTimeInMillis();
         if (bc){
             calendar.set(Calendar.ERA, GregorianCalendar.BC);
@@ -868,7 +867,6 @@
         // '-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?
         Date date = null;
         Calendar calendar = Calendar.getInstance();
-        int dsTimeOffset = calendar.get(Calendar.DST_OFFSET);
         calendar.clear();
 
 
@@ -984,8 +982,8 @@
                 }
             }
             calendar.set(Calendar.MILLISECOND, miliSecond);
-            calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet - dsTimeOffset);
-            calendar.set(Calendar.DST_OFFSET, dsTimeOffset);
+            calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet);
+            calendar.set(Calendar.DST_OFFSET, 0);
 
 
 



Mime
View raw message