Fix date calculation in ol.format.IGC

This commit is contained in:
Tom Payne
2014-01-16 20:04:06 +01:00
parent a83df1ee30
commit 7cfca09632

View File

@@ -127,8 +127,8 @@ ol.format.IGC.prototype.readFeatureFromText = function(text) {
} }
flatCoordinates.push(z); flatCoordinates.push(z);
} }
var date = new Date(year, month, day, hour, minute, second, 0); var dateTime = Date.UTC(year, month, day, hour, minute, second, 0);
flatCoordinates.push(date.getTime() / 1000); flatCoordinates.push(dateTime / 1000);
} }
} else if (line.charAt(0) == 'H') { } else if (line.charAt(0) == 'H') {
m = ol.format.IGC.HFDTE_RECORD_RE_.exec(line); m = ol.format.IGC.HFDTE_RECORD_RE_.exec(line);