Access date in Zotero.Item::toJSON should be in ISO-8601 format
This commit is contained in:
parent
47bf9c38e9
commit
9d5d8b525a
2 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue