EPL timezone to UTC

*EPL used

*While creating measurements and events from the EPL, the time that is genenrated is in a different timezone compared to UTC. Considered trying the TimeFormat methods, we are still not able to generate the time in UTC . Below mentioned response demonstrates the situation.

float currentTime is used to fetch the exact time to create measurements and events. But while fetching response of the events/measurements, it is +2:00 ahead of UTC.
“type”: “xxxxxxx”,
“lastUpdated”: “2023-10-14T08:43:16.552Z”,
“time”: “2023-10-14T10:43:13.300+02:00”,
“id”: “xxxxxx”

How this “time” can be as same as the “lastUpdated” using EPL?

The time conversion happens based on the ‘TZ’ environment defined on the microservice. (see General aspects - Cumulocity IoT Guides for more details).

The client consumes the timezone defined in environment and converts the float (seconds since epoch) representation to the appropriate ISO 8601 time.

If you want the time to be represented in UTC, please configure the tenant option as described in General aspects - Cumulocity IoT Guides and restart the microservice.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.