title: Using openweathermap api to forecast by time
body: <p>I'm playing around with openweathermap api to print out the forecast onto screen using the api supplied. </p>
  
  <p>What I am trying to do is get the forecast for at given hour in the future or past, I can see this information in the results from the api call. I'm not sure how to get this information tho? It looks to be in unix timestamp and human readable formats but I can see how in the api just to print out this forecast for a given time?</p>
  
  <p>Thanks </p>
  
  <pre><code>Example API code
      http://api.openweathermap.org/data/2.5/forecast?lat=51.5072&amp;lon=0.1275&amp;units=metric
  
  Example forecast "dt_txt":"2013-09-14 00:00:00"},{"dt":1379127600,
  
  Example web page
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Weather&lt;/title&gt;
      &lt;meta charset="utf-8"&gt;
  
      &lt;script src="http://code.jquery.com/jquery-1.7.min.js" &gt;&lt;/script&gt;
      &lt;script src="http://code.jquery.com/ui/1.7.0/jquery-ui.js" &gt;&lt;/script&gt;
  
  &lt;script&gt;
  function getWeather(callback) {
      var weather = 'http://api.openweathermap.org/data/2.5/forecast?lat=51.5072&amp;lon=0.1275&amp;units=metric';
      $.ajax({
        dataType: "jsonp",
        url: weather,
        success: callback
      });
  }
  
  // get data:
  getWeather(function (data) {
      console.log('weather data received');
      console.log(data.list[0].weather[0].description); 
      console.log(data.list[0].weather[0].main);  
  });
  
  getWeather(function (data) {
      document.write('weather data received');
      document.write('&lt;br&gt;');
      document.write(data.list[0].weather[0].description);
  document.write('&lt;br&gt;');
      document.write(data.list[0].weather[0].main);
  document.write('&lt;br&gt;');
      document.write(data.list[0].main.temp);
  document.write('&lt;br&gt;');
  });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>