cancel
Showing results for 
Search instead for 
Did you mean: 

UTC in local Annotations

mifo
Participant
0 Kudos

We would like to display a timestampe (Type Edm.DateTime) coming from a odata service within our sapui5 app without conversion to the local (user) timezone.

Is there a way to specify this via local annotations? Like it is possible within a view:

value="{path: 'detailView>/fromDate', type: 'sap.ui.model.type.DateTime', formatOptions: { pattern: 'dd.MM.YYYY HH:mm', UTC: true }}"

with the UTC: true parameter?

Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

mifo
Participant

A have a solution for this from jens.pflueger (thank you again ;-)):

https://blogs.sap.com/2019/06/05/ui5-smartcontrols-how-to-use-date-and-time-related-data-types/comme...

There is no option to set this on annotation level but it is possible to set it for a smartTable:

<smartTable:SmartTable>

<smartTable:customData>

<core:CustomData id="_IDEGen_customdata2" key="useUTCDateTime" value="true"/>

</smartTable:customData>

</smartTable:SmartTable>

Br,

Michael

gregorw
Active Contributor

Maybe you can link to the original answer from Jens?