Stream: hapi
Topic: dateTimeFormat
Yun Jing (Apr 19 2016 at 20:05):
In the spec http://hl7.org/fhir/2015Sep/search.html#date, saying the time can be just hours and minutes with no seconds. But it seems that hapi1.2 treats, for example, 2015-08-05T10:00, as an invalid date/time string.
James Agnew (Apr 19 2016 at 21:21):
The time needs a timezone offset if it has a time... So 2015-08-05T10:00Z
would be valid but 2015-08-05T10:00
is not
Yun Jing (Apr 19 2016 at 22:25):
I have tested 2015-08-05T10:00Z
which is invalid either. According to the parse method from BaseDateTimeDt, it checkes that the length = 4, 6, 7, 8, 10, or >= 18. But for 2015-08-05T10:00Z
, the length is 17 which is invalid.
James Agnew (Apr 20 2016 at 01:50):
Sorry, my mistake. It's actually not valid to have a time with minutes but no seconds, even with a timezone. Per the spec:
Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.
Yun Jing (Apr 20 2016 at 04:04):
Thanks @James Agnew
Last updated: Apr 12 2022 at 19:14 UTC