Answer the question
In order to leave comments, you need to log in
How to parse OpenWeatherMap date?
Working with the openweathermap api, I encountered such a problem: they store the date in this format: "1436022000". What is this format and how to parse it into javascript date?
new Date(1436022000) returns the following: Thu Jan 01 1970 05:00:00
Answer the question
In order to leave comments, you need to log in
Unix time
Number of seconds elapsed since January 1, 1970
Hence the outputvar date = new Date(1436022000 * 1000);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question