title: Unix time from API to normal format
body: <p>I'm using openweathermap for my application <a href="https://openweathermap.org/current" rel="nofollow noreferrer">https://openweathermap.org/current</a> and I need to input the current time with weather in the city. </p>
  
  <p>The time in the API in UNIX format. How I can input the time in application in normal format (h:m:s)</p>
  
  <p>Line with date/time from API (dt....Time of data calculation, unix, UTC)</p>
  
  <p>Below my JS code</p>
  
  <pre><code>    document.querySelector('#city').addEventListener('keyup', function(e) {
    if (e.keyCode === 13) {
  
          var city = $(this).val();
          if (city !== '') {
  
              $.ajax({
  
                  url: 'http://api.openweathermap.org/data/2.5/weather?q=' + city + "&amp;units=metric" +
                      "&amp;APPID=bb037310921af67f24ba53f2bad48b1d",
                  type: "GET",
                  dataType: "json",
                  success: function (data) {
                      var widget = show(data);
  
                      $("#show").html(widget);
  
                      $("#city").val(' ');
  
                  }
  
              });
  
          } else {
              $("#error").html("&lt;div class='alert alert-danger text-center'&gt;&lt;a href='#' class='close' data-dismiss='alert' aria-label='close'&gt;&amp;times;&lt;/a&gt;Field cannot be empty&lt;/div&gt;");
          }
  
      };
  });
  
  
  function show(data) {
      return "&lt;h2&gt;Current Weather for " + data.name + "," + data.sys.country + "&lt;/h2&gt;" +
      "&lt;h3&gt;&lt;strong&gt;Wind Speed&lt;/strong&gt;: " + data.dt + "&lt;/h3&gt;" +
          "&lt;h3&gt;&lt;strong&gt;Weather&lt;/strong&gt;: &lt;img src='http://openweathermap.org/img/w/" + data.weather[0].icon + ".png'&gt;" + data.weather[0].main + "&lt;/h3&gt;" +
          "&lt;h3&gt;&lt;strong&gt;Description&lt;/strong&gt;: " + data.weather[0].description + "&lt;/h3&gt;" +
          "&lt;h3&gt;&lt;strong&gt;Temperature&lt;/strong&gt;: " + data.main.temp + "&amp;deg;C&lt;/h3&gt;" +
          "&lt;h3&gt;&lt;strong&gt;Pressure&lt;/strong&gt;: " + data.main.pressure + "hPa&lt;/h3&gt;" +
          "&lt;h3&gt;&lt;strong&gt;Humidity&lt;/strong&gt;: " + data.main.humidity + " %&lt;/h3&gt;" +
          "&lt;h3&gt;&lt;strong&gt;Min. Temperature&lt;/strong&gt;: " + data.main.temp_min + "&amp;deg;C&lt;/h3&gt;" +
          "&lt;h3&gt;&lt;strong&gt;Max. Temperature&lt;/strong&gt;: " + data.main.temp_max + "&amp;deg;C&lt;/h3&gt;" +
          "&lt;h3&gt;&lt;strong&gt;Wind Speed&lt;/strong&gt;: " + data.wind.speed + "m/s&lt;/h3&gt;" +
          "&lt;h3&gt;&lt;strong&gt;Wind Direction&lt;/strong&gt;: " + data.wind.deg + "&amp;deg;&lt;/h3&gt;";
  
  }
  </code></pre>