Timestamp zone and asset datapoint API

Hello,
I’m collecting data from several Shellies through MQTT and have now retrieved it through the API. I’ve previously seen in the OR graph that the timestamps are in local time. In PostgreSQL they are also like this (timestamp without time zone). Is that because the collected data was in local time? I mean, they are never internally converted to UTC before saving them in the database? I don’t know if that will cause a problem when the time change occurs.
Anyway, the point is that if I use the API /asset/datapoint/{assetId}/{attributeName} using the request body

{
	"fromTime": "2024-05-15T14:24:00",
	"toTime": "2024-05-15T14:25:00",
	"type": "string"
}

and the format suggested in the documentation:

{
	"fromTime": "2024-05-15T14:24:00.000Z",
	"toTime": "2024-05-15T14:25:00.000Z",
	"type": "string"
}

the result is the same, with timestamps in local time between 14:24:00 and 14:25:00. Not what I would expect if I use UTC format. Is this a bug or is it just me?

Thanks

Hi!

I’m always confused about timezones myself, so excuse me if this is not useful at all;

.
The AssetDatapointQuery body within the asset datapoint API accepts either

  • a java.time.LocalDateTime as the “fromTime” parameter,
  • or the amount of milliseconds from epoch using the “fromTimestamp” parameter.

We use the last one most often within the UI, haven’t used the “fromTime” in a while.