[xslt] exslt date:seconds function

Hi all -

  While chasing after a bug in the above function, I noticed how it
was producing results that seemed to be completely wrong to me. 
Basically, if one gave the function a date/time string of
"1970-01-01T00:00:10" it produced a result of -10.  I was
considering changing it, but decided to first do a little
research, so I "googled" it and got back, among other hits, a
thread on the subject which we had on this list.  That thread
eventually concluded that the -ve result was correct.

  I still didn't like it, so I went back to exslt.org and looked at
the xml documentation on the function.  There, it clearly stated
that the function was to produce the number of seconds *since*
1970-01-01T00:00:00Z, although the actual published spec phrased
things differently (which was what was discussed in our previous

  Just to make doubly certain, I sent an email to the exslt person
responsible for that function, explaining the problem and asking
for confirmation that what we are now doing is incorrect.  I got
back this response:-

Hi Bill,

> In other words, the spec _should_ have said "...the difference
> between 1970-01-01T00:00:00Z and the date/time string...", and
> everyone (including me) would have been happy.

Yes, that's what it should have said.

> Could I ask you to confirm that you (exslt) really intended the
> description of the function to amplify how, for a given date/time
> string, it produces the "number of seconds since
> 1970-01-01T00:00:00"? If so,I can take that confirmation back to the
> libxslt mailing list as justification for a proposal to fix it.

Yes, that's what it meant. I'll get the wording changed to make this



Jeni Tennison

  So, could I ask the list, is there any violent objection if I fix
the function so that does what the spec intended it to do (i.e.
outputs a +ve value for my above example)?  Is there anyone who
would be damaged if this change is included in the next release of



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]