Advertisement
Guest User

Untitled

a guest
Jul 26th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1.  
  2. #### Dark Sky web API behaviour
  3. ##### Requesting with a datetime specified:
  4. When requesting data data with a time specified, we get a full 24 hours reported, starting at 0:00 (midnight). This data might include predictions if we request data from the current day.
  5.  
  6. ##### Requesting historic data:
  7. If we request historic data at moment X, all preceding data [X-N, X] is historic data. Al succeeding data [X, X+N], with X+N <= now, is also observed historic data. If X+N > now it is predicted data.
  8.  
  9. Predictions that were made in the past are no longer available.
  10.  
  11. When you request data and specify the time, the provided time is always interpreted by forecast.io as being the LOCAL time. When asking what the current().d['time'] is from the returned object, or from the 24-hour period, this, too, will be in local time.
  12. So always request time in Local time, then later convert back to UTC.
  13.  
  14. ##### Requesting current data (predictions):
  15. If 'current' data is requested (no time provided), we obtain a 48 hour period in hours, from the current hour (ignoring minutes) in UTC/GMT time.
  16. It seems that, in this case, the returned times are in local time. Not in UTC/GMT time.
  17.  
  18. Once time passes the predicted data is updated with real, observed data. Also, sometimes earlier predictions are updated for moments that are still in the future and which were previously predicted (the predictions converge to the true, observed value).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement