diff --git a/dev/Common/Translator.js b/dev/Common/Translator.js index 46d3a3dc7..5fff9e8a9 100644 --- a/dev/Common/Translator.js +++ b/dev/Common/Translator.js @@ -134,7 +134,7 @@ export const timeToNode = (element, time) => { try { if (time) { - element.dateTime = (new Date(time * 1000)).format('Y-m-d\\TH:i:s'); + element.dateTime = (new Date(time * 1000)).format('ISO8601'); } else { time = Date.parse(element.dateTime) / 1000; } diff --git a/dev/prototype.js b/dev/prototype.js index a0a9008a4..478bd84b5 100644 --- a/dev/prototype.js +++ b/dev/prototype.js @@ -46,7 +46,7 @@ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat Date.prototype.format = function (options, UTC, hourCycle) { if (typeof options == 'string') { - if ('Y-m-d\\TH:i:s' == options) { + if ('ISO8601' == options) { return this.getFullYear() + '-' + pad2(1 + this.getMonth()) + '-' + pad2(this.getDate()) + 'T' + pad2(this.getHours()) + ':' + pad2(this.getMinutes()) + ':' + pad2(this.getSeconds()); }