Skip to Content
0
Oct 04, 2017 at 07:22 AM

DatePicker update dateValue (Edm.DateTimeOffset) not setting time zone

549 Views Last edit Oct 04, 2017 at 07:26 AM 3 rev


Hi,

I have a a sap.m.DatePicker and its dateValue is binded to a property with type Edm.DateTimeOffset.

<DatePicker displayFormat="medium" dateValue="{Timestamp}"/>


<Property Name="Timestamp" Type="Edm.DateTimeOffset" Precision="0" sap:label="Time Stamp"/>

When receiving data it comes in the following format:

"Timestamp":"\/Date(1507593600000+0000)\/"

After changing the date from the DatePicker and submit the pending changes it sends the date in the following format:

"Timestamp":"\/Date(1508976000000)\/"

As you can see the time zone offset is missing.

How to add it in the odata model?

Kind Regards,

Ivan