Project

Profile

Help

Bug #4254

closed

adjust-time-to-timezone(xs:time("18:25:29.900005Z"), ()) delivers "18:25:29."

Added by Michael Kay almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2019-07-17
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

adjust-time-to-timezone(xs:time("18:25:29.900005Z"), ()) delivers 18:25:29.

There are two issues here: (a) the loss of precision, and (b) the trailing full stop in the string representation.

Actions #1

Updated by Michael Kay almost 5 years ago

The first problem is caused by the code internally using the constructor that expects microseconds rather than nanoseconds.

The second problem is a side-effect of the fact that due to arithmetic overflow, the number of nanoseconds held in the value is negative.

I have changed a number of places that used the old microsecond contstructor to use the new nanosecond constructor in its place. In most cases the only adverse consequence was a loss of precision, e.g. when converting xs:dateTime to xs:time.

Actions #2

Updated by Michael Kay almost 5 years ago

  • Status changed from New to Resolved
Actions #3

Updated by O'Neil Delpratt over 4 years ago

  • Fix Committed on Branch 9.9, trunk added
Actions #4

Updated by O'Neil Delpratt over 4 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.9.1.5 added

Bug fix applied in the Saxon 9.9.1.5 maintenance release.

Please register to edit this issue

Also available in: Atom PDF