axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r674525 - in /webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding: types/Time.java utils/ConverterUtil.java
Date Mon, 07 Jul 2008 15:21:12 GMT
Author: amilas
Date: Mon Jul  7 08:21:11 2008
New Revision: 674525

URL: http://svn.apache.org/viewvc?rev=674525&view=rev
Log:
it is enough to set the DST_TIME to zero

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=674525&r1=674524&r2=674525&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  7 08:21:11 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;
@@ -197,8 +196,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=674525&r1=674524&r2=674525&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  7 08:21:11 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,10 +982,7 @@
                 }
             }
             calendar.set(Calendar.MILLISECOND, miliSecond);
-            calendar.set(Calendar.ZONE_OFFSET, timeZoneOffSet - dsTimeOffset);
-            calendar.set(Calendar.DST_OFFSET, dsTimeOffset);
-
-
+            calendar.set(Calendar.DST_OFFSET, 0);
 
         } else {
             throw new NumberFormatException("date string can not be less than 19 charactors");



Mime
View raw message