Incorrect use of timezone Z instead of implicit timezone

Sunday, 8 July 2012 · 2 messages · last reply 9 Jul 2012
GR
Gunther Rademacher8 Jul 2012 20:50 #
As explained in http://www.w3.org/TR/xquery-operators/#func-subtract-dates the implicit timezone should be used for augmenting an xs:date without a timezone before subtracting it from one with a timezone. BaseX however appears to be using timezone Z in this case. The following xquery demonstrates this:
    current-date() - xs:date(substring(string(current-date()), 1, 10))
It should return a zero duration, but BaseX returns -PT2H I am in timezone +02:00. Best regards Gunther
CG
Christian Grün9 Jul 2012 17:36 #
Gunther, thanks for your observation. The issue has been fixed with the latest snapshot [1]. It also fixes comparisons between dates, e.g.:
  current-date() eq xs:date(substring(string(current-date()), 1, 10))
Quoted text · Gunther Rademacher · 26 lines
On Sun, Jul 8, 2012 at 8:50 PM, Gunther Rademacher <grd at gmx.net> wrote: > As explained in > > http://www.w3.org/TR/xquery-operators/#func-subtract-dates > > the implicit timezone should be used for augmenting an xs:date without a > timezone before subtracting it from one with a timezone. > > BaseX however appears to be using timezone Z in this case. > > The following xquery demonstrates this: > > current-date() - xs:date(substring(string(current-date()), 1, 10)) > > It should return a zero duration, but BaseX returns > > -PT2H > > I am in timezone +02:00. > > Best regards > Gunther > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

⚡Generated with XQuery