You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2012/08/01 20:10:04 UTC

svn commit: r1368150 - /incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDateTimePointable.java

Author: prestonc
Date: Wed Aug  1 18:10:03 2012
New Revision: 1368150

URL: http://svn.apache.org/viewvc?rev=1368150&view=rev
Log:
Updated the toString function to show the complete date time value.

Modified:
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDateTimePointable.java

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDateTimePointable.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDateTimePointable.java?rev=1368150&r1=1368149&r2=1368150&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDateTimePointable.java (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDateTimePointable.java Wed Aug  1 18:10:03 2012
@@ -180,8 +180,21 @@ public class XSDateTimePointable extends
     }
 
     public static String toString(byte[] bytes, int start) {
-        return getMonth(bytes, start) + "/" + getDay(bytes, start) + "/" + getYear(bytes, start) + "T"
-                + getHour(bytes, start) + ":" + getMinute(bytes, start) + ":" + getMilliSecond(bytes, start);
+        return getMonth(bytes, start)
+                + "-"
+                + getDay(bytes, start)
+                + "-"
+                + getYear(bytes, start)
+                + "T"
+                + getHour(bytes, start)
+                + ":"
+                + getMinute(bytes, start)
+                + ":"
+                + getMilliSecond(bytes, start)
+                + (getTimezoneHour(bytes, start) != DateTime.TIMEZONE_HOUR_NULL
+                        && getTimezoneMinute(bytes, start) != DateTime.TIMEZONE_MINUTE_NULL ? (getTimezoneHour(bytes,
+                        start) < 0 || getTimezoneMinute(bytes, start) < 0 ? "-" : "+")
+                        + getTimezoneHour(bytes, start) + ":" + getTimezoneMinute(bytes, start) : "");
     }
 
 }
\ No newline at end of file