Open
Description
When I make an API call to https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY
right now (Thu, 01 Oct 2020 01:30:49 GMT) I get a 404:
{
"code": 404,
"msg": "No data available for date: 2020-10-01",
"service_version": "v1"
}
It’s currently Sep 30 in my time zone, not Oct 1. I understand if the server wants to give me Oct 1’s image after midnight UTC, but if so it shouldn’t give me a 404.
I suspect that's because the "current date" default sometimes changes before the image is actually made available (due to time zone differences, maybe?):
Lines 127 to 129 in a434768
However it looks like there is already some code to handle this. So I guess that's not working properly:
Lines 263 to 271 in a434768