The time when forecasts have been generated has stopped appearing??

  • 1
  • Problem
  • Updated 5 years ago
Hi. At some point my custom PHP script to get the 10-day forecast broke, and I discovered it was because the json return value no longer has a forecast->txt_forecast->date, which I presume was the time that the forecast was generated. If my understanding of this value is correct, could it please be put back in to the forecast information?
Photo of terry@letsche.net

terry@letsche.net

  • 3 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
It should still be there. Did you save what the JSON looked like at the time to compare? When I load the forecast I see the date field.
Photo of terry@letsche.net

terry@letsche.net

  • 3 Posts
  • 0 Reply Likes
I did not. However, here is an excerpt from a current one:

When I go to http://api.wunderground.com/api/[myke... the result starts with:

{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/a...",
"features": {
"forecast10day": 1
}
}
,
"forecast":{
"txt_forecast": {
"date":"",
etc.

I assume "date" above is where the date when the forecast is generated would appear?? If you'd like me to post more of the json results I could certainly do that.

Terry
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
I see what you mean. We will be switching to a new forecast system in January and that date will always be filled in then. For now, sometimes it is empty because of a bug in the backend that makes that data point. Sorry for the confusion, but a fix is coming.