Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
Merge branch 'stable'
zadam8a2a9b2ea6bc
diff --cc src/services/import/enex.jsindex b00d2e21ba,d21da57e0e..b516f1fffd--- a/src/services/import/enex.js+++ b/src/services/import/enex.js@@@ -8,13 -8,19 +8,19 @@@ const noteService = require("../notes")const imageService = require("../image");const protectedSessionService = require('../protected_session');const htmlSanitizer = require("../html_sanitizer");--const attributeService = require("../attributes");+const {sanitizeAttributeName} = require("../sanitize_attribute_name.js");- // date format is e.g. 20181121T193703Z+ /**+ * date format is e.g. 20181121T193703Z or 2013-04-14T16:19:00.000Z (Mac evernote, see #3496)+ * @returns trilium date format, e.g. 2013-04-14 16:19:00.000Z+ */function parseDate(text) {- // insert - and : to make it ISO format- text = `${text.substr(0, 4)}-${text.substr(4, 2)}-${text.substr(6, 2)} ${text.substr(9, 2)}:${text.substr(11, 2)}:${text.substr(13, 2)}.000Z`;+ // convert ISO format to the "20181121T193703Z" format+ text = text.replace(/[-:]/g, "");++ // insert - and : to convert it to trilium format+ text = text.substr(0, 4) + "-" + text.substr(4, 2) + "-" + text.substr(6, 2)+ + " " + text.substr(9, 2) + ":" + text.substr(11, 2) + ":" + text.substr(13, 2) + ".000Z";return text;}