diff --git a/src/net/aksingh/java/api/owm/AbstractWeatherData.java b/src/net/aksingh/java/api/owm/AbstractWeatherData.java index e8adff9..bee14be 100644 --- a/src/net/aksingh/java/api/owm/AbstractWeatherData.java +++ b/src/net/aksingh/java/api/owm/AbstractWeatherData.java @@ -606,7 +606,14 @@ abstract public class AbstractWeatherData { // converting seconds to Date object if (sec != Long.MIN_VALUE) { - this.dateTime = new Date(sec); + /* + @bugfix It always return "Sat Jan 17 04:10:42 CET 1970" + Issue: #3 given at http://code.aksingh.net/owm-japis/issue/3/problem-with-datetime + Incorrect: this.dateTime = new Date(sec); + Correct: this.dateTime = new Date(sec * 1000); + Reason: Date requires milliseconds but previously, seconds were provided. + */ + this.dateTime = new Date(sec * 1000); } else { this.dateTime = null; }