Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncation of "Fraction of Second" Value in ISO 8601 Standard #532

Open
medclinic opened this issue Aug 4, 2023 · 0 comments
Open

Truncation of "Fraction of Second" Value in ISO 8601 Standard #532

medclinic opened this issue Aug 4, 2023 · 0 comments

Comments

@medclinic
Copy link

According to the ISO 8601 standard, the fraction of a second can be represented with one to six digits.

1ms - 001000
10ms - 010000
100ms - 100000
1μs - 000001

openEHR specification states that "Any date, datetime or timestamp value provided by a create or update action inside the COMPOSITION content will be preserved as it was sent by the client".

However, it was noticed that the "fraction of second" value is being truncated, but only when the "fraction of second" consists solely of zeros. This specific issue led to the failure of the following test case. Additionally, it's important to note that having all zeros in the "fraction of second" is completely valid according to the ISO 8601 standard.

assertEquals("2023-05-22T04:29:35.000000", new DvDateTime("2023-05-22T04:29:35.000000").getValue().toString());

Expected Output: "2023-05-22T04:29:35.000000"
Actual Output: "2023-05-22T04:29:35"

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

No branches or pull requests

1 participant