Issue with API time rounding

If I have some code that sends a request to the API in the format

https://pvoutput.org/service/r2/getstatus.jsp?sid=12345&key=myreadonlyapikey&t=13:03

where t= the current time according to the requesting server
The API seems to handle this by rounding to the nearest 5-minute interval

So the API would request the information as recorded at 13.05, a time in the future and the API will return “Bad request 400: No status found”

Initially, I thought this could be fixed by making sure the server always rounded down.However, I remembered that the information might not be sent to the server until 13.07 so it may even return an error if t=13.06 rounded to 13.05

As such could I recommend that the is the time value is after the last record value that it return the last recorded value as it does when t is not specified.

Otherwise, this will always have to be done by the requesting server.

For interest. I am asking this because I am building a PV output AI app

Remove the time and Get Status will return the last recorded time.

1 Like

Thanks for your prompt reply. I intend to set it to t=0 when the time requested by the user is within a certain range of current time. I just wanted to make this ?bug /feature known.