You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, TSComponentOne.GMTOffset contains the local offset instead of the expected placeholder -99.
Expected behaviour
When a TS field contains a date only, without time or offset, TSComponentOne.GMTOffset contains the placeholder -99.
Environmental Details (please complete the following information):
OS: Windows 10
Target Framework: netstandard2.0
Version: 3.1.1
HL7 Version: 2.3.1 and 2.4
Additional context
This 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.
// if the offset does not exist and a time value does not exist then// we must provide a default offset = to the local time zoneif(timeVal==null&&offsetExists==false){vardefaultOffset=DataTypeUtil.LocalGMTOffset;tm=newCommonTM();tm.Offset=defaultOffset;}// end if// if we have a time value then make a new time object and set it to the// input time value (as long as the time val has time + offset or just time only)if(timeVal!=null&&timeValIsOffsetOnly==false){// must make sure that the time component contains both hours and minutes// at the very least -- must be at least 4chars in length.if(timeValLessOffset.Length<4){ ...}}tm=newCommonTM();tm.Value=timeVal;}
The text was updated successfully, but these errors were encountered:
Describe the bug
When a
TS
field (such asPID-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, TSComponentOne.GMTOffset contains the local offset instead of the expected placeholder -99.To Reproduce
Expected behaviour
When a
TS
field contains a date only, without time or offset, TSComponentOne.GMTOffset contains the placeholder -99.Environmental Details (please complete the following information):
Additional context
This 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.
The text was updated successfully, but these errors were encountered: