Stream: fhirpath
Topic: Date/time comparison semantics with different timezones
Bryn Rhodes (Oct 03 2018 at 03:37):
We've put together a proposed disposition for this FHIRPath ballot comment: GF#18607
Bryn Rhodes (Oct 03 2018 at 03:38):
As part of that, we're surveying existing implementations on current behavior. If you have a FHIRPath implementation, can you please describe the current behavior of your engine with respect to comparing date/time values with different timezone offsets?
Bryn Rhodes (Oct 03 2018 at 03:57):
For example, what does your implementation return for the following expressions:
@2017-11-05T01:30:00.0-04:00 > @2017-11-05T01:15:00.0-05:00 @2017-11-05T01:30:00.0-04:00 < @2017-11-05T01:15:00.0-05:00 @2017-11-05T01:30:00.0-04:00 = @2017-11-05T01:15:00.0-05:00 @2017-11-05T01:30:00.0-04:00 = @2017-11-05T00:30:00.0-05:00
Grahame Grieve (Oct 03 2018 at 11:41):
Java RI:
false
true
false
false
Grahame Grieve (Oct 03 2018 at 12:05):
Pascal RI:
true
false
false
false
Grahame Grieve (Oct 03 2018 at 12:06):
I added them to the standard tests
Grahame Grieve (Oct 03 2018 at 12:20):
This is before I investigate to decide what the output should be
Chris Moesel (Oct 03 2018 at 13:04):
The JavaScript CQL execution engine (which should use the same semantics since FHIRPath is a subset of CQL) says:
false
true
false
true
These are the results you would expect if you "respect offsets" by normalizing to a single offset before performing comparisons.
Bryn Rhodes (Oct 03 2018 at 13:10):
These are the results from the Java-based CQL engine:
Test1 [1:1] false
Test2 [2:1] true
Test3 [3:1] false
Test4 [4:1] true
Ewout Kramer (Oct 03 2018 at 13:46):
The results from the .NET evaluator:
false,
true,
false,
true
Ewout Kramer (Oct 03 2018 at 13:47):
Indeed, everything is normalized to UTC before comparison.
Grahame Grieve (Oct 03 2018 at 13:50):
I thought I did too....
Paul Lynch (Oct 03 2018 at 14:59):
fhirpath.js does not yet support comparing dates at different time zones (so I won't bother including its output on those tests).
Bryn Rhodes (Oct 08 2018 at 16:27):
Thank you for the feedback on this, we've proposed a disposition here: GF#18607 and will review and hopefully approve on tomorrow's ITS call.
Bryn Rhodes (Oct 08 2018 at 19:42):
Correction, the next ITS call is the 16th, not tomorrow.
Last updated: Apr 12 2022 at 19:14 UTC