My goal ist to get the weather of a given day (e.g. 2022-01-14) and a given location (without knowing the timezone) using the "forecastDaily" dataSet. The API does not seem to accept timestamps without date information so I use UTC midnight as dailyStart (e.g. "2022-01-14T00:00:00Z") and dailyEnd (e.g. "2022-01-15T00:00:00Z") . This seems to work for most regions, like with the ones with a positive longitude, but the more I go west, the API returns 2 days in the "days" list of "forecastDaily" and in some extremes (like Hawaii) the wrong (previous) day is returned from the API.
Specific example:
- dailyStart: 2022-01-14T00:00:00Z
- dailyEnd: 2022-01-15T00:00:00Z
- request weather for Kiribati (UTC+14): returns day with forecastStart 2022-01-13T10:00:00Z -> this is what I want
- request weather for Hawaii (UTC-10): returns day with forecastStart 2022-01-13T10:00:00Z -> this is not what I want, as this is the weather for 2022-01-13 and not 2022-01-14
As Hawaii and Kiribati are about the same longitude I also cannot make any assumptions based on longitude alone. As the API doesn't return the local timezone (as the DarkSky API has been doing) I also cannot use this info that. I would have to have full knowledge of where the timezone boundaries are. The core problem is that I have to provide a "timezoned" parameter for dailyStart and dailyEnd. I would want to provide just the date, like "2022-01-14".
Is there no easy way to get the weather for any place on earth solely based on the date?