We are using the EM OData service to retrieve event handlers for freight orders out of SAP TM. That works fine. However, the format of the event date/time values are not clear to me.
I reported some events for a freight order directly through the TM Transportation Cockpit. My time zone there is set to CET. What confuses me right now, are the resulting values in OData (/FreightOrderEventHandlerDetails):
<d:EventDateTime>2015-10-28T14:12:00Z</d:EventDateTime>
suggests the event was reported at 13:12:00 CET, as a trailing Z indicates the UTC time zone. But in fact it was not. The correct time is 14:12:00 CET, which is exactly what I entered in the Transportation Cockpit. But there is also the EventTimeZone field:
<d:EventTimeZone>CET</d:EventTimeZone>
So maybe the service doesn’t care about the Z pattern at all, if a separate time zone field is provided.
Because then again, there is also this – correctly – added to every entry:
<updated>2015-10-28T13:13:11Z</updated>
That’s the time I saved my changes in Transportation Cockpit.
So what should I do to use the times provided via OData in a UI5 app and display the values according to the user's local time zone? Check if there is a separate time zone field and manually convert the date/time value according to a custom time zone table?
Am I missing a EM (or possibly TM) setting?
- SAPK-92003INSCEMSRV
- SAPK-74012INSAPGWFND
Regards,
Jan