stefan 2003/07/29 09:39:46
Modified: proposals/jcrri/src/javax/jcr/util ISO8601.java
Log:
jcr ri: fixing iso8601-compliant date formatting bug
Revision Changes Path
1.3 +3 -1 jakarta-slide/proposals/jcrri/src/javax/jcr/util/ISO8601.java
Index: ISO8601.java
===================================================================
RCS file: /home/cvs/jakarta-slide/proposals/jcrri/src/javax/jcr/util/ISO8601.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ISO8601.java 30 May 2003 13:13:53 -0000 1.2
+++ ISO8601.java 29 Jul 2003 16:39:45 -0000 1.3
@@ -90,7 +90,7 @@
TimeZone tz = cal.getTimeZone();
format.setTimeZone(tz);
- StringBuffer tzd = new StringBuffer("Z");
+ StringBuffer tzd = new StringBuffer();
int offset = tz.getRawOffset();
if (offset != 0) {
int hours = Math.abs((offset / (60 * 1000)) / 60);
@@ -99,6 +99,8 @@
tzd.append(xxFormat.format(hours));
tzd.append(":");
tzd.append(xxFormat.format(minutes));
+ } else {
+ tzd.append("Z");
}
return format.format(cal.getTime()) + tzd.toString();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]