René's URL Explorer Experiment


Title: Unexpected GMTOffset when field contains date only · Issue #558 · nHapiNET/nHapi · GitHub

Open Graph Title: Unexpected GMTOffset when field contains date only · Issue #558 · nHapiNET/nHapi

X Title: Unexpected GMTOffset when field contains date only · Issue #558 · nHapiNET/nHapi

Description: Describe the bug When a TS field (such as PID-7 Date/Time of Birth) contains a date and time without an offset, TSComponentOne.GMTOffset contains the placeholder -99. When a TS field contains a date only, without time or offset, TSCompon...

Open Graph Description: Describe the bug When a TS field (such as PID-7 Date/Time of Birth) contains a date and time without an offset, TSComponentOne.GMTOffset contains the placeholder -99. When a TS field contains a dat...

X Description: Describe the bug When a TS field (such as PID-7 Date/Time of Birth) contains a date and time without an offset, TSComponentOne.GMTOffset contains the placeholder -99. When a TS field contains a dat...

Opengraph URL: https://github.com/nHapiNET/nHapi/issues/558

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected GMTOffset when field contains date only","articleBody":"**Describe the bug**\r\nWhen a `TS` field (such as `PID-7` Date/Time of Birth) contains a date and time without an offset, TSComponentOne.GMTOffset contains the placeholder -99.\r\n\r\nWhen a `TS` field contains a date only, without time or offset, TSComponentOne.GMTOffset contains the local offset instead of the expected placeholder -99.\r\n\r\n**To Reproduce**\r\n``` cs\r\nforeach (var value in new[] { \"20230603\", \"202306031234\", \"20230603+0800\", \"202306031234+0800\" })\r\n{\r\n  var message = new NHapi.Model.V24.Message.ADT_A05();\r\n  message.PID.DateTimeOfBirth.TimeOfAnEvent.Value = value;\r\n\r\n  Console.WriteLine(message.PID.DateTimeOfBirth.TimeOfAnEvent.GMTOffset);\r\n}\r\n\r\n// expected -99, -99, 800, 800\r\n// actual 800, -99, 800, 800\r\n```\r\n\r\n**Expected behaviour**\r\nWhen a `TS` field contains a date only, without time or offset, TSComponentOne.GMTOffset contains the placeholder -99.\r\n\r\n**Environmental Details (please complete the following information):**\r\n\r\n- OS: Windows 10\r\n- Target Framework: netstandard2.0\r\n- Version: 3.1.1\r\n- HL7 Version: 2.3.1 and 2.4\r\n\r\n**Additional context**\r\nThis appears to be specific behavior in the setter for CommonTS.Value as shown below, which seems really strange. I'd expect the offset to be ignored for a date-only value, since it's only meaningful in the presence of a time.\r\n\r\n``` cs\r\n// if the offset does not exist and a time value does not exist then\r\n// we must provide a default offset = to the local time zone\r\nif (timeVal == null \u0026\u0026 offsetExists == false)\r\n{\r\n  var defaultOffset = DataTypeUtil.LocalGMTOffset;\r\n  tm = new CommonTM();\r\n  tm.Offset = defaultOffset;\r\n} // end if\r\n\r\n// if we have a time value then make a new time object and set it to the\r\n// input time value (as long as the time val has time + offset or just time only)\r\nif (timeVal != null \u0026\u0026 timeValIsOffsetOnly == false)\r\n{\r\n  // must make sure that the time component contains both hours and minutes\r\n  // at the very least -- must be at least 4chars in length.\r\n  if (timeValLessOffset.Length \u003c 4) { ... }}\r\n\r\n  tm = new CommonTM();\r\n  tm.Value = timeVal;\r\n}\r\n``` ","author":{"url":"https://github.com/stormcrow79","@type":"Person","name":"stormcrow79"},"datePublished":"2024-04-26T08:15:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/558/nHapi/issues/558"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e8b7e6f3-77eb-9e3c-89e3-2e7aa07c39f7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9E4E:320964:EA3361:13B1C2B:6A4C61EC
html-safe-noncebc871ee75cf97cf8681ee0d9025eb57b074c3032c26c27b44459ce27615c89d5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTRFOjMyMDk2NDpFQTMzNjE6MTNCMUMyQjo2QTRDNjFFQyIsInZpc2l0b3JfaWQiOiI4NDU4MTAwMzEwNjM5NjY1NjQ0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac5414de19f5e7cbe18cbb8039dece648dd7d79eaed8300206dce70816e09d4538
hovercard-subject-tagissue:2265224916
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nHapiNET/nHapi/558/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f4d8751b715f014f40a8167adab5d85cc6c0c2fdacadfbb5f3ea1d0aa904360a/nHapiNET/nHapi/issues/558
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f4d8751b715f014f40a8167adab5d85cc6c0c2fdacadfbb5f3ea1d0aa904360a/nHapiNET/nHapi/issues/558
og:image:altDescribe the bug When a TS field (such as PID-7 Date/Time of Birth) contains a date and time without an offset, TSComponentOne.GMTOffset contains the placeholder -99. When a TS field contains a dat...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamestormcrow79
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
go-importgithub.com/nHapiNET/nHapi git https://github.com/nHapiNET/nHapi.git
octolytics-dimension-user_id70870423
octolytics-dimension-user_loginnHapiNET
octolytics-dimension-repository_id29993598
octolytics-dimension-repository_nwonHapiNET/nHapi
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id29993598
octolytics-dimension-repository_network_root_nwonHapiNET/nHapi
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release14099438da5379150f15a2892474c7c7e6c0e55e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nHapiNET/nHapi/issues/558#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FnHapiNET%2FnHapi%2Fissues%2F558
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FnHapiNET%2FnHapi%2Fissues%2F558
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nHapiNET%2FnHapi
Reloadhttps://github.com/nHapiNET/nHapi/issues/558
Reloadhttps://github.com/nHapiNET/nHapi/issues/558
Reloadhttps://github.com/nHapiNET/nHapi/issues/558
Please reload this pagehttps://github.com/nHapiNET/nHapi/issues/558
nHapiNET https://github.com/nHapiNET
nHapihttps://github.com/nHapiNET/nHapi
Notifications https://github.com/login?return_to=%2FnHapiNET%2FnHapi
Fork 164 https://github.com/login?return_to=%2FnHapiNET%2FnHapi
Star 307 https://github.com/login?return_to=%2FnHapiNET%2FnHapi
Code https://github.com/nHapiNET/nHapi
Issues 24 https://github.com/nHapiNET/nHapi/issues
Pull requests 10 https://github.com/nHapiNET/nHapi/pulls
Discussions https://github.com/nHapiNET/nHapi/discussions
Actions https://github.com/nHapiNET/nHapi/actions
Projects https://github.com/nHapiNET/nHapi/projects
Wiki https://github.com/nHapiNET/nHapi/wiki
Security and quality 0 https://github.com/nHapiNET/nHapi/security
Insights https://github.com/nHapiNET/nHapi/pulse
Code https://github.com/nHapiNET/nHapi
Issues https://github.com/nHapiNET/nHapi/issues
Pull requests https://github.com/nHapiNET/nHapi/pulls
Discussions https://github.com/nHapiNET/nHapi/discussions
Actions https://github.com/nHapiNET/nHapi/actions
Projects https://github.com/nHapiNET/nHapi/projects
Wiki https://github.com/nHapiNET/nHapi/wiki
Security and quality https://github.com/nHapiNET/nHapi/security
Insights https://github.com/nHapiNET/nHapi/pulse
Unexpected GMTOffset when field contains date onlyhttps://github.com/nHapiNET/nHapi/issues/558#top
awaiting reviewhttps://github.com/nHapiNET/nHapi/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
https://github.com/stormcrow79
stormcrow79https://github.com/stormcrow79
on Apr 26, 2024https://github.com/nHapiNET/nHapi/issues/558#issue-2265224916
awaiting reviewhttps://github.com/nHapiNET/nHapi/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.