jnioche / carbonintensity-api

A simple Rust library to retrieve data from https://api.carbonintensity.org.uk/
Apache License 2.0
9 stars 0 forks source link

Shift date and / or time before calling the API #4

Closed jnioche closed 10 months ago

jnioche commented 10 months ago

The API returns the 30min slot with the range inclusive of the start date

carbonintensity-api -s 2023-11-19 postcode bs7
2023-11-18 23:30:00, 223
2023-11-19 00:00:00, 241
...

We should rewrite the start date so that it is aligned with the closest 30 min boundary + 1min