1

select * from weather.forecast where woeid in (SELECT woeid FROM geo.placefinder WHERE text="30.7063633,76.7047791" and gflags="R")

I am using the above YQL to fetch the weather conditions for some lat, lng to show in my iOS app. The response has "pubDate":

"pubDate": "Fri, 29 May 2015 8:30 am IST",
     "condition": {
      "code": "28",
      "date": "Fri, 29 May 2015 8:30 am IST",
      "temp": "89",
      "text": "Mostly Cloudy"

My concern is, will this "pubDate" ever change? I mean at 8:30 am the weather is mostly cloudy may be at 12 noon it won't be. If i access this YQL at 12 Noon the response will be same ??

Also, I have no idea about the "and gflags="R"" part of the query..

nr5
  • 4,228
  • 8
  • 42
  • 82

2 Answers2

0

As per Yahoo developer docs here.

pubDate The date and time this forecast was posted, in the date format defined by RFC822 Section 5, for example Mon, 25 Sep 17:25:18 -0700.

lastBuildDate The last time the feed was updated. The format is in the date format defined by RFC822 Section 5, for example Mon, 25 Sep 17:25:18 -0700.

So, until and unless the backend gets an update of "temperature change" for a particular location, the API will not reflect any change. So that's why "lastBuildDate" is also comes in the json, which specifies when the temperature feed was last updated. So you can't do anything manually to get the temperature of a particular location for current time,

Community
  • 1
  • 1
Vizllx
  • 9,135
  • 1
  • 41
  • 79
0

If you try to call this API in different moments during the same day you will see that lastBuildDate is the same date and time of your call. The problem here is that the date in the condition doesn't change, and after some time the condition itself becomes obsolete, as you can easily verify using yahoo meteo app.

ErmannoS
  • 318
  • 2
  • 6