#10 TSComponentOne.GetAsDate breaks when time zone is included

open
nobody
Parser (14)
5
2008-10-27
2008-10-27
Anonymous
No

Any HL7 field of data type TS is supposed to allow a time zone included in the format:

YYYY[MM[DD[HH[MM[SS[.S[S[S[S]]]]]]]]][+/-ZZZZ]

Where the +/-ZZZZ is the time zone.

The code in NHapi.Base.Model.Primitive.TSComponentOne.GetAsDate breaks when a time zone component is included, e.g. when the time stamp is
"20080330153136-0400"

Probably in the GetAsDate function the time zone needs to be extracted before trying to parse the date/time stamp.

Discussion