Searching dates and time zone

Hi there,

Since the date search parameter covers date, dateTime, instant, Period, and Timing and each of them might/might not have time zone information, what’s the guidance on how should the comparison be done?

For example, let’s say Patient has birthday of 2017-01-01. If the search parameter is eq2017-01-01, then this should obviously result in match. But what happens if the search parameter contain time zone such as eq2017-01-01T00:00:00-07:00? Are we supposed to know that birthday is a date time and therefore doesn’t contain time and so even if the search parameter is specified with full time zone information, we should only look at the date portion?

Also, spec mention that "Where both search parameters and resource element date times do not have time zones, the servers local time zone should be assumed. ", what happens if one value has time zone and one value does not have time zone? Are we supposed to assume the value that does not have time zone as server’s local time zone and then compare that with the value that has time zone specified?

Also is it right thing to assume server’s local time zone when the information is not provided? Data can be distributed across regions or moved from one data center to another data center.


There’s a reason why this isn’t specified in the standard - it’s hard, and we couldn’t be confident that we even understood all the ramifications of this, let alone come to agreement. So it’s up to the implementer.

My server assumes local timezone when nothing is specified.