Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timezone inconsistency when constructing FHIR.DateTime #132

Open
EvanMachusak opened this issue Aug 8, 2022 · 0 comments
Open

Timezone inconsistency when constructing FHIR.DateTime #132

EvanMachusak opened this issue Aug 8, 2022 · 0 comments

Comments

@EvanMachusak
Copy link

EvanMachusak commented Aug 8, 2022

Consider this CQL:

define "DateTime in GMT":
    DateTime(2022, 8, 8, 1, 30, 0, 0, 0)

define "FHIR DateTime in GMT":
    FHIR.dateTime { value: "DateTime in GMT" }

define "To Date":
    Date(year from "DateTime in GMT", month from "DateTime in GMT", day from "DateTime in GMT")

define "To Date from FHIR":
    Date(year from "FHIR DateTime in GMT", month from "FHIR DateTime in GMT", day from "FHIR DateTime in GMT")

The output of this code is:

DateTime in GMT=2022-08-08T01:30:00.000
To Date=2022-08-08
FHIR DateTime in GMT=dateTime
To Date from FHIR=2022-08-07

I ran this from a computer set to EST.

It appears that when constructing the FHIR.dateTime in CQL, the evaluator is converting the GMT dateTime to EST. This is inconsistent with constructed system dateTime types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant