Merge pull request #1543 from twpayne/vector-api-igc-fix-time

[vector-api] Fix date calculation in ol.format.IGC
This commit is contained in:
Tom Payne
2014-01-17 06:24:13 -08:00

View File

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