Fix date conversion on ImproveOSM comments

This commit is contained in:
SilentSpike
2019-02-05 20:03:55 +00:00
parent fa87ed75ae
commit f7bef29b92

View File

@@ -77,7 +77,7 @@ export function uiImproveOsmComments() {
if (!s) return null;
var detected = utilDetect();
var options = { day: 'numeric', month: 'short', year: 'numeric' };
var d = new Date(s);
var d = new Date(s * 1000); // timestamp is served in seconds, date takes ms
if (isNaN(d.getTime())) return null;
return d.toLocaleDateString(detected.locale, options);
}