Clarification - are date times in local or UTC

The API takes date and time in yyyddmm style formats without any time zone.

I am guessing that this is local time (since the viewer is likely to both write and read in their own time zone)

But can I get clarification on that.

It is the local time of the system.

I know it is an old post, but it would be nice to have the option to post in UTC. My database is in UTC to overcome some DST issues in March and October. Adding a timezone or a capital T for UTC-time to the API specifications would do.

I’m uploading consumption data and in Belgium we have daylight saving time.

One hour of consumption data will be overwritten when changing from DST (summertime GMT+2) to STD (wintertime GMT+1). It is the data between 2:00 and 3:00. One hour of consumption data will be missing when changing from STD to DST, because 2:00 changes to 3:00. The daily total is still correct, since I upload cumulative energy values.

If we could upload timestamps in UTC, this would not happen since time would always increase monotonically.

2 Likes

Nicely explained!

@bankstownbloke Any chance you could make this happen? :blush::pray:

Would be nice if there was some feedback or a roadmap. @Qubic gives a nice problem explanation, I suggest a possible implementation, since all my PV-data are in UTC (DateTime, not Timestamp).

One should always try and follow a standard so the best way to fix this is to enhance the API to allow the caller to specify a ISO 8801 time zone designator on the end of the time string, or as a separate z parameter. You people who want to send plain UTC would just append a Z on the end of your time string, e.g. as “10:00Z”.

2 Likes