Skip to content

Tolerate sub-millisecond differences in TDML dateTime comparison#1682

Open
gdesrosiers1805 wants to merge 1 commit into
apache:mainfrom
gdesrosiers1805:bugfix/daffodil-3086
Open

Tolerate sub-millisecond differences in TDML dateTime comparison#1682
gdesrosiers1805 wants to merge 1 commit into
apache:mainfrom
gdesrosiers1805:bugfix/daffodil-3086

Conversation

@gdesrosiers1805

@gdesrosiers1805 gdesrosiers1805 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

ICU calendars are millisecond-precision, so fractional microseconds in
xs:dateTime values are not preserved on parse. Truncate fractional seconds
to milliseconds from the XMLGregorianCalendars before comparison, so
sub-millisecond differences are ignored rather than flagged as mismatches.

DAFFODIL-3086

@stevedlawrence stevedlawrence left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, minor suggestions

Comment thread daffodil-core/src/main/scala/org/apache/daffodil/lib/xml/XMLUtils.scala Outdated
Comment thread daffodil-core/src/main/scala/org/apache/daffodil/lib/xml/XMLUtils.scala Outdated

@olabusayoT olabusayoT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 minor comment about embedded schema name to prevent confusion down the line

ICU calendars are millisecond-precision, so fractional microseconds in
xs:dateTime values are not preserved on parse. Truncate fractional seconds
to milliseconds from the XMLGregorianCalendars before comparison, so
sub-millisecond differences are ignored rather than flagged as mismatches.

DAFFODIL-3086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants