With the parameters “from” and “to” I limit a time range. In my concrete case I want to use today’s day from 00:00 to 24:00.
So far so good, the example above works, but the timezone is not correct because with the ‘Z’ I use UTC. In fact I want to use “CET” and “CEST” instead of ‘Z’. But when I just write “CEST” instead of ‘Z’, then I get a “400 Bad Request”.
How do I have to configure the “stateExtension” in the HTTP binding to query the current day considering the timezone?
Thanks for your reply. That is somthing I had alredy tried before…
The API requires an iso date. When I try your suggestion in the API’s swagger ui, then I can send successful requests with an “+02:00” offset as mentioned by you (see screenshot):
When I do the same with the HTTP Binding, then I receive the following Error in the logfile:
Requesting 'https://cloud.solar-manager.ch/v1/statistics/gateways/<anyId>?accuracy=high&from=2023-02-15T00:00:00.000+02:00&to=2023-02-15T23:59:59.000+02:00' (method='GET', content='null') failed: 400 Bad Request
When url encoding the ‘+’ and ‘:’ character I receive the following error:
Creating request for 'https://cloud.solar-manager.ch/v1/statistics/gateways/<anyId>?accuracy=high&from=%1$tY-%1$tm-%1$tdT00:00:00.000%2B02%3A00&to=%1$tY-%1$tm-%1$tdT23:59:59.000%2B02%3A00' failed: Format specifier '%3A'