From 32e9b1ada715b661cce17d2c30804f98a8897f73 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 12 Jun 2017 20:46:49 +0000 Subject: [PATCH] Moment timezone --- CliClient/app/cmd.js | 6 ++++++ CliClient/package.json | 1 + ReactNativeClient/src/models/note.js | 16 ++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/CliClient/app/cmd.js b/CliClient/app/cmd.js index 1b7dcf41d4..c8ddecd149 100644 --- a/CliClient/app/cmd.js +++ b/CliClient/app/cmd.js @@ -45,6 +45,12 @@ let fileDriver = new FileApiDriverLocal(); let fileApi = new FileApi('/home/laurent/Temp/TestImport', fileDriver); let synchronizer = new Synchronizer(db, fileApi); + + +// import moment from 'moment-timezone'; + +// console.info(moment.tz.guess()); + db.open({ name: '/home/laurent/Temp/test.sqlite3' }).then(() => { BaseModel.db_ = db; diff --git a/CliClient/package.json b/CliClient/package.json index 2bdc97b1c2..c40b8a802e 100644 --- a/CliClient/package.json +++ b/CliClient/package.json @@ -9,6 +9,7 @@ "jssha": "^2.3.0", "mkdirp": "^0.5.1", "moment": "^2.18.1", + "moment-timezone": "^0.5.13", "node-fetch": "^1.7.1", "promise": "^7.1.1", "react": "16.0.0-alpha.6", diff --git a/ReactNativeClient/src/models/note.js b/ReactNativeClient/src/models/note.js index 198127ea89..0f1191a9de 100644 --- a/ReactNativeClient/src/models/note.js +++ b/ReactNativeClient/src/models/note.js @@ -39,6 +39,22 @@ class Note extends BaseModel { return output.join("\n"); } + // static fromFriendlyString(item) { + // let lines = []; + // // mynote + + // // abcdefg\nsecond line\n\nline after two newline + + // // author: + // // longitude: -3.4596633911132812 + // // latitude: 48.73219093634444 + // // is_todo: 0 + // // todo_due: 0 + // // todo_completed: 0 + // // created_time: 2017-06-12 05:02:38 + // // updated_time: 2017-06-12 05:02:38 + // } + static filename(note) { return folderItemFilename(note) + '.md'; }