-
Notifications
You must be signed in to change notification settings - Fork 179
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
Fix more than 3 digits for milliseconds in datetime #409
Merged
Conversation
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
@@ -37,7 +37,8 @@ public PartialDateTime(string input, DateTimeType type = DateTimeType.Fhir) | |||
int hour = groups["hour"].Success ? int.Parse(groups["hour"].Value) : 0; | |||
int minute = groups["minute"].Success ? int.Parse(groups["minute"].Value) : 0; | |||
int second = groups["second"].Success ? int.Parse(groups["second"].Value) : 0; | |||
int millisecond = groups["millisecond"].Success ? int.Parse(groups["millisecond"].Value) : 0; | |||
int millisecond = groups["millisecond"].Success ? int.Parse(groups["millisecond"].Value.Length > 3 ? groups["millisecond"].Value.Substring(0, 3) : groups["millisecond"].Value) : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 4th digit is invalid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4th is invalid when new a datetime object in .net.
So we both save string part of millisecond and 3 digits as int value here.
yankunhuang-pku
approved these changes
Jul 5, 2022
QuanWanxx
added a commit
that referenced
this pull request
Jul 6, 2022
* Fix more than 3 digits for milliseconds in datetime (#409) * fix * fix * Update version to 5.0.3 (#412) Co-authored-by: sowu880 <[email protected]>
sowu880
added a commit
that referenced
this pull request
Oct 27, 2022
* Update README.md * Create HL7v2-templates.md * Create HL7v2-FHIRValidator.md * Create HL7v2-ImportantPoints.md * Update README.md * Update README.md Updated STU3-R4 information for OSS FHIR Server * Fix StyleCop Dependency (#397) - Fix build-time dependency on StyleCop.Analyzers to no longer force consumers to use the same analyzers * Bump Newtonsoft.Json in /src/Microsoft.Health.Fhir.TemplateManagement Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 12.0.3 to 13.0.1. - [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases) - [Commits](JamesNK/Newtonsoft.Json@12.0.3...13.0.1) --- updated-dependencies: - dependency-name: Newtonsoft.Json dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Bump Newtonsoft.Json from 12.0.3 to 13.0.1 in src/Microsoft.Health.Fhir.TemplateManagement/Microsoft.Health.Fhir.Liquid.Converter.nuspec * Exclude data folder * Update the GeoPol * Update version * Remove StyleCop from Nuspec (#410) - Remove StyleCop from the nuspec to prevent forcing consumers to import StyleCop * Prepare new release for 5.0.3 (#413) * Fix more than 3 digits for milliseconds in datetime (#409) * fix * fix * Update version to 5.0.3 (#412) Co-authored-by: sowu880 <[email protected]> * Add NJsonSchema dependency to nuspec file (#423) * Prepare new release for 5.0.5 (#425) * Update version to 5.0.5 (#424) * Interface to convert JObject (#416) * build: Insert missing ampersand * build: Fix bin-folder creation * build: fix mkdir command for windows * build: unfix mkdir command for windows * build: remove double binfolder * build: Ignore error in folder creation Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: yankunhuang-pku <[email protected]> Co-authored-by: ginalee-dotcom <[email protected]> Co-authored-by: sowu880 <[email protected]> Co-authored-by: Irene Joseph <[email protected]> Co-authored-by: Qiwei Jin <[email protected]> Co-authored-by: Will Sugarman <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yankun Huang <[email protected]> Co-authored-by: Yue Fei <[email protected]> Co-authored-by: Will Sugarman <[email protected]> Co-authored-by: QuanWanxx <[email protected]>
sowu880
added a commit
that referenced
this pull request
Nov 25, 2022
* Update README.md * Create HL7v2-templates.md * Create HL7v2-FHIRValidator.md * Create HL7v2-ImportantPoints.md * Update README.md * Update README.md Updated STU3-R4 information for OSS FHIR Server * Fix StyleCop Dependency (#397) - Fix build-time dependency on StyleCop.Analyzers to no longer force consumers to use the same analyzers * Bump Newtonsoft.Json in /src/Microsoft.Health.Fhir.TemplateManagement Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 12.0.3 to 13.0.1. - [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases) - [Commits](JamesNK/Newtonsoft.Json@12.0.3...13.0.1) --- updated-dependencies: - dependency-name: Newtonsoft.Json dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Bump Newtonsoft.Json from 12.0.3 to 13.0.1 in src/Microsoft.Health.Fhir.TemplateManagement/Microsoft.Health.Fhir.Liquid.Converter.nuspec * Exclude data folder * Update the GeoPol * Update version * Remove StyleCop from Nuspec (#410) - Remove StyleCop from the nuspec to prevent forcing consumers to import StyleCop * Prepare new release for 5.0.3 (#413) * Fix more than 3 digits for milliseconds in datetime (#409) * fix * fix * Update version to 5.0.3 (#412) Co-authored-by: sowu880 <[email protected]> * Add NJsonSchema dependency to nuspec file (#423) * Prepare new release for 5.0.5 (#425) * Update version to 5.0.5 (#424) * Interface to convert JObject (#416) * update * update * update * update * update * update * update * update * update * update Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: yankunhuang-pku <[email protected]> Co-authored-by: ginalee-dotcom <[email protected]> Co-authored-by: Irene Joseph <[email protected]> Co-authored-by: Qiwei Jin <[email protected]> Co-authored-by: Will Sugarman <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yankun Huang <[email protected]> Co-authored-by: Yue Fei <[email protected]> Co-authored-by: Will Sugarman <[email protected]> Co-authored-by: QuanWanxx <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix issue #401