commit 9d5d8b525ad1479bfb5ce78a25dbcc3d68ae37e8 parent 47bf9c38e96e41d066a1c267365a6010be42b038 Author: Aurimas Vinckevicius <aurimas.dev@gmail.com> Date: Mon, 27 Apr 2015 19:32:45 -0500 Access date in Zotero.Item::toJSON should be in ISO-8601 format Diffstat:
| M | chrome/content/zotero/xpcom/data/item.js | | | 4 | ++++ |
| M | chrome/content/zotero/xpcom/utilities_internal.js | | | 3 | +++ |
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -4978,6 +4978,10 @@ Zotero.Item.prototype.toJSON = function(options) { name = 'versionNumber'; } + if (name == 'accessDate') { + val = Zotero.Date.dateToISO(Zotero.Date.sqlToDate(val)); + } + obj[name] = val; } } diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js @@ -431,6 +431,9 @@ Zotero.Utilities.Internal = { // SQL instead of ISO-8601 item.dateAdded = zoteroItem.dateAdded; item.dateModified = zoteroItem.dateModified; + if (item.accessDate) { + item.accessDate = zoteroItem.getField('accessDate'); + } // Map base fields for (let field in item) {