Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Erroneous JSON-Timestamps?

Dear fellow developers,

I developed an OData service which contains entity types with Edm.DateTime properties. Using that service I receive erroneous results for timestamps when requesting JSON responses, which differ from the result received when requesting XML.

Did anyone of you ever experience that?

Example request:

..._SRV/MaintenanceNotifications?$filter=ChangeTimestamp ge datetime'2015-07-10T09:00:00'

XML response:

...<d:ChangeTimesamp>2015-07-14T09:22:48</(d:ChangeTimesamp>

JSON response (request sent with header Accept = application/json):

..."ChangeTimestamp" : "\/Date(1436865768000)\/"...

The timestamp from the JSON response corresponds to 2015-07-14 at 11:22:48, which is 2 hours ahead of the value in the XML response.

2 hours is also the time zone difference between UTC and CET summertime. System time zone and user time zone are both set to CET.

However, that should not make a difference, as XML responses are already correct?!

The System is on NetWeaver 7.4 with SAP_GWFND 740 SP 8.

Thank you for any helpful hints,

best regards,

Ringo

Message was edited by: Ringo Liebscher - added missing example request and responses.

Former Member
Not what you were looking for? View more on this topic or Ask a question