Skip to content

Test Runner Not Detecting Equal DateTimes (Offset vs No Offset) #84

@cmoesel

Description

@cmoesel

When running the test CqlDateTimeOperatorsTest:Add:DateTimeAdd5Hours, the test runner reports:

Test CqlDateTimeOperatorsTest:Add:DateTimeAdd5Hours status: fail expected: @2005-05-10T10 actual: @2005-05-10T10+00:00

My engine is returning the following result:

{
  "resourceType": "Parameters",
  "parameters": [
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-cqlType",
          "valueString": "System.DateTime"
        }
      ],
      "name": "return",
      "valueDateTime": "2005-05-10T10+00:00"
    }
  ]
}

I suspect that the issue is that my DateTime uses offset +00:00, but the runner is expecting no offset. It should be valid for the engine to return a DateTime with an offset in its results since the CQL specification says:

If no timezone offset is specified, the timezone offset of the evaluation request timestamp is used.

So after processing, it seems reasonable that resulting DateTimes would have the evaluation timestamp's offset applied.

NOTE: I think this may be what #77 is intending to address.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions