-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Me/dpc 4280 patient entity converter bug (#2278)
## 🎫 Ticket https://jira.cms.gov/browse/DPC-4280 ## 🛠 Changes Fixes bug in the `PatientEntity.toLocalDate()` method that caused it to fail when given a date close to midnight. ## ℹ️ Context If you passed a Date between 11pm and midnight to the `PatientEntity.toLocalDate()` it would mistakenly return a `LocalDate` for the next day. This was because in the conversion we were assuming UTC time, and we are actually located in EST. As for why the previous process failed, consider a `Date` of "1/1/2024 at 11:30pm EST". Converting that to UTC we get "1/2/2024 12:30am UTC". Then converting it to a LocalDate, which has no concept of time zone, we get "1/2/2024" when we were expecting "1/1/2024". In the new version we use the system default time zone. ## 🧪 Validation Created new test to verify results.
- Loading branch information
1 parent
b948299
commit 9214fe4
Showing
2 changed files
with
27 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters