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

DateTime conversion: MedicationStatement.DateAsserted #304

Open
KevinMayfield opened this issue Sep 10, 2019 · 5 comments
Open

DateTime conversion: MedicationStatement.DateAsserted #304

KevinMayfield opened this issue Sep 10, 2019 · 5 comments

Comments

@KevinMayfield
Copy link

We are supplying DateAsserted as

"dateAsserted": "2019-09-10T10:42:08.425Z",

And acceptance test returns

Shouldly.ShouldAssertException : toCheck
should be less than or equal to
2019-09-10T10:44:37.3810160Z
but was
2019-09-10T11:44:36.8010000+01:00

@KevinMayfield
Copy link
Author

This appears to be caused by the dateConversion in: AccesStructuredMedicationSteps line 538.

DateTime dateAsserted = DateTime.Parse(medStatement.DateAsserted);

This converts the correct time to BST (2019-09-10T11:44:36.8010000+01:00)

@KevinMayfield
Copy link
Author

KevinMayfield commented Nov 8, 2019

Will recheck on 1.2.4 (suspect not an issue due to current TZ)

@PeterGresty
Copy link
Collaborator

From my initial investigation, this appears to the fact that the code, is using utcNow which does not apply the offset for BST, and hence why there was one hour discrepancy...(test was run in BST)
As we are now out of BST then, if that theory holds then the test would now pass for you..
Kevin , Can you re-run this test and report back, if it now passes ? Once you confirm the results, I could look at putting in a change that would stop that happening in the future. Thx

@KevinMayfield
Copy link
Author

Confirm this is working fine now.

@PeterGresty
Copy link
Collaborator

Thanks for confirming, I will further investigate this and develop a fix should one be required.

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

2 participants