jpenninkhof / odata-boilerplate

OpenUI5 boilerplate based on OLingo, JPA and Spring Boot
MIT License
82 stars 41 forks source link

It returns DateTime or Timestamp values in a wrong format #12

Closed mjza closed 4 years ago

mjza commented 4 years ago

The problem is olingo does not return the date/time or timestamp columns in a correct format as defined in Odata standard (or maybe Microsoft standard). I mean my front-end library (i.e. OpenUI5) expects some value like /Date(1579075200000)/</d:ValidFrom> for Edm.DateTime column but what olingo returns is 2020-01-15T08:00:00</d:ValidFrom> which is not accepted by OpenUI5!

What is your suggestion?

1- Is there a way that I force Olingo to return data/time or timestamp in the format that Microsoft defined or not? (i.e. /Date(timestamp)/)

2- Is there a way that OpenUI5 accept the date\time in a format like yyyy-MM-ddTHH:mm:ss ?

mjza commented 4 years ago

In XML it returns this type, In $format=json it will returns timestamp