Access date in Zotero.Item::toJSON should be in ISO-8601 format

This commit is contained in:
Aurimas Vinckevicius 2015-04-27 19:32:45 -05:00
parent 47bf9c38e9
commit 9d5d8b525a
2 changed files with 7 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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) {