summaryrefslogtreecommitdiff
path: root/libexslt
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2003-07-29 04:44:20 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2003-07-29 04:44:20 +0000
commit1b409ab12e25fd0706d4009a32a6074b7333efa2 (patch)
tree89bbe942b3462ca788d5bf915c33b3b208af6461 /libexslt
parent91cefd843f536e0ce003fa0bc9ee1de036a8c8dc (diff)
downloadlibxslt-1b409ab12e25fd0706d4009a32a6074b7333efa2.tar.gz
libxslt-1b409ab12e25fd0706d4009a32a6074b7333efa2.tar.bz2
libxslt-1b409ab12e25fd0706d4009a32a6074b7333efa2.zip
changed sign of date:seconds as previously posted to the mailing list
* libexslt/date.c test/exslt/data/seconds.1 : changed sign of date:seconds as previously posted to the mailing list * numbers.c: extensive modification to cater for UTF8 within the various routines.
Diffstat (limited to 'libexslt')
-rw-r--r--libexslt/date.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libexslt/date.c b/libexslt/date.c
index 1fe64aaa..7e2658bf 100644
--- a/libexslt/date.c
+++ b/libexslt/date.c
@@ -2667,6 +2667,12 @@ exsltDateAddDuration (const xmlChar *xstr, const xmlChar *ystr)
* In these cases the difference between the @dateTime and
* 1970-01-01T00:00:00Z is calculated and converted to seconds.
*
+ * Note that there was some confusion over whether "difference" meant
+ * that a dateTime of 1970-01-01T00:00:01Z should be a positive one or
+ * a negative one. After correspondence with exslt.org, it was determined
+ * that the intent of the specification was to have it positive. The
+ * coding was modified in July 2003 to reflect this.
+ *
* Returns seconds or Nan.
*/
static double
@@ -2704,7 +2710,7 @@ exsltDateSeconds (const xmlChar *dateTime)
y->value.date.day = 1;
y->value.date.tz_flag = 1;
- dur = _exsltDateDifference(dt, y, 1);
+ dur = _exsltDateDifference(y, dt, 1);
if (dur != NULL) {
ret = exsltDateCastDateToNumber(dur);
exsltDateFreeDate(dur);