[4suite-checkins] In 4Suite/Ft/Xml/XPath, files BuiltInExtFunctions.py

John Clark jclark at 4suite.org
Sat Jul 21 09:23:39 MDT 2007


Modified Files:
    BuiltInExtFunctions.py

Log Message:
Fix for `f:parse-date` bug posted by Keith Gabryelski (see 
<http://lists.fourthought.com/pipermail/4suite/2007-July/008292.html>).

ViewCVS diff:
  http://cvs.4suite.org/viewcvs/4Suite/Ft/Xml/XPath/BuiltInExtFunctions.py.diff?r1=1.73&r2=1.74
ViewCVS view:
  http://cvs.4suite.org/viewcvs/4Suite/Ft/Xml/XPath/BuiltInExtFunctions.py?rev=1.74&content-type=text/vnd.viewcvs-markup

Index: BuiltInExtFunctions.py
===================================================================
RCS file: /var/local/cvsroot/4Suite/Ft/Xml/XPath/BuiltInExtFunctions.py,v
retrieving revision 1.73
retrieving revision 1.74
diff -U 2 -r1.73 -r1.74
--- BuiltInExtFunctions.py	15 Sep 2006 16:53:26 -0000	1.73
+++ BuiltInExtFunctions.py	21 Jul 2007 15:23:38 -0000	1.74
@@ -426,5 +426,5 @@
 
 
-def ParseDate(context, date, format=None):
+def ParseDate(context, date, format):
     """
     This function is similar to EXSLT's date:parse-date()
@@ -435,5 +435,5 @@
     date = Conversions.StringValue(date)
     format = Conversions.StringValue(format)
-    time_tuple = time.strptime(format)
+    time_tuple = time.strptime(date, format)
     #perhaps add some variants for missing time tuple values?
     str_time = time.strftime("%Y-%m-%dT%H:%M:%S", time_tuple)


More information about the 4suite-checkins mailing list