Fix XSD parsing of non-Zulu times

This commit is contained in:
Andreas Hocevar
2016-07-26 16:32:46 +02:00
parent cd8fafbead
commit e2d96082f9
2 changed files with 19 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
goog.provide('ol.test.XSD');
describe('ol.format.XSD', function() {
describe('readDateTime', function() {
it('can handle non-Zulu time zones', function() {
var node = document.createElement('time');
node.textContent = '2016-07-12T15:00:00+03:00';
expect(new Date(ol.format.XSD.readDateTime(node) * 1000).toISOString()).to.eql('2016-07-12T12:00:00.000Z');
});
});
});
goog.require('ol.format.XSD');