What format is this date value in?

javascript, json

Solution

If I'm on the right page, the API documentation says here that it's a GMT Unix timestamp:

dt | Time of data receiving in unixtime GMT

To convert it into a human-readable format using JavaScript, see the answer to this question.

Problem

Here's a forecast for London, GB from the Open Weather Map in JSON format. ``` http://api.openweathermap.org/data/2.5/forecast/daily?id=524901 ``` Each list item in the JSON has a key within it called `dt` that looks like `"dt":1399626000` I haven't done this before, so how do I figure out what format (unix timestamp?) and timezone `dt` is in (e.g. GMT, UTC), and how to translate the `dt` into a human-friendly format.

Original source

Related problems