ilene 2005/01/10 07:03:20
Modified: java/src/org/apache/xalan/lib ExsltDatetime.java
Log:
Fix for JIRA bug #2013. Duplicate time zone string returned from EXSLT
time() function.
Revision Changes Path
1.14 +10 -4
xml-xalan/java/src/org/apache/xalan/lib/ExsltDatetime.java
Index: ExsltDatetime.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/lib/ExsltDatetime.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ExsltDatetime.java 11 Feb 2004 17:56:36 -0000 1.13
+++ ExsltDatetime.java 10 Jan 2005 15:03:20 -0000 1.14
@@ -196,7 +196,7 @@
if (time == null || zone == null)
return EMPTY_STR;
- String[] formatsIn = {dt, d};
+ String[] formatsIn = {dt, d, t};
String formatOut = t;
Date date = testFormats(time, formatsIn);
if (date == null) return EMPTY_STR;
@@ -212,8 +212,14 @@
{
String datetime = dateTime().toString();
String time = datetime.substring(datetime.indexOf("T")+1);
- String zone = datetime.substring(getZoneStart(datetime));
- return (time + zone);
+
+ // The datetime() function returns the zone on the datetime string.
If we
+ // append it, we get the zone substring duplicated.
+ // Fix for JIRA 2013
+
+ // String zone = datetime.substring(getZoneStart(datetime));
+ // return (time + zone);
+ return (time);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]