Quantcast
Channel: SCN : Popular Discussions - SAP NetWeaver Gateway Developer Center
Viewing all articles
Browse latest Browse all 1657

Erroneous JSON-Timestamps?

$
0
0

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 aheadof 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.


Viewing all articles
Browse latest Browse all 1657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>