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

CDS (3 and 4) - a field of type timestamp is stored wrong when using HANA #96

Open
the-docta opened this issue Aug 27, 2020 · 0 comments

Comments

@the-docta
Copy link

(filed as 561141 / 2020)

I have a CAP data model, where I have a field BeginDate of type DateTime. When the field is stored in HANA (via CDS - currently version 4), the field is stored shifted by tqo hours (which exactly corresponds to the used timezone)

I debugged the case through to the place where cds-runtime is calling hana-client. The data is passed correctly. the hana-client stores the data in the HANA DB and ignores the timezone when doing that.

In the screenshot, the SQL Statement is shown, that is passed to hana client: UPDATE ... SET BeginDate = "2020-08-22T14:02:00.000+02:00"

in the HANA table, the begin date is then stored as 2020-08-22 14:02:00 UTC. which is wrong. It should be storing 12:02:00 UTC.

cds version:
@sap/audit-logging: 3.1.1
@sap/cds: 4.1.7
@sap/cds-compiler: 1.35.0
@sap/cds-dk: 2.0.8
@sap/cds-foss: 2.0.0
@sap/cds-mtx: 1.0.17
@sap/cds-reflect: 2.12.2
@sap/cds-runtime: 2.1.7
@sap/hana-client: 2.5.105
@sap/hdi-deploy: 3.11.11
@sap/instance-manager: 2.2.0
@sap/xsenv: 3.0.0
@sap/xssec: 3.0.9
Node.js: v12.12.0

image

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