Missed a UTC adjustment in 673168ea7b

This commit is contained in:
Simon Kornblith 2015-05-31 17:13:06 -04:00
parent 8ff108cbdf
commit ca0af1abd6
2 changed files with 34 additions and 42 deletions

View File

@ -415,14 +415,6 @@ function generateTranslatorExportData(legacy, currentData) {
itemGetter._itemsLeft = [zItem]; itemGetter._itemsLeft = [zItem];
translatorExportData[itemName] = itemGetter.nextItem(); translatorExportData[itemName] = itemGetter.nextItem();
// Adjut ISO accessDate so that it doesn't depend on computer time zone
// Effectively, assume that current time zone is UTC
if (!legacy && translatorExportData[itemName].accessDate) {
let date = Zotero.Date.isoToDate(translatorExportData[itemName].accessDate);
date.setUTCMinutes(date.getUTCMinutes() - date.getTimezoneOffset());
translatorExportData[itemName].accessDate = Zotero.Date.dateToISO(date);
}
// Don't replace some fields that _always_ change (e.g. item keys) // Don't replace some fields that _always_ change (e.g. item keys)
if (!currentData || !currentData[itemName]) continue; if (!currentData || !currentData[itemName]) continue;

View File

@ -1,7 +1,7 @@
{ {
"artwork": { "artwork": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"artworkMedium": "Medium", "artworkMedium": "Medium",
@ -41,7 +41,7 @@
"audioRecording": { "audioRecording": {
"ISBN": "978-1-234-56789-7", "ISBN": "978-1-234-56789-7",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -95,7 +95,7 @@
}, },
"bill": { "bill": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"billNumber": "3", "billNumber": "3",
"code": "Code", "code": "Code",
@ -141,7 +141,7 @@
}, },
"blogPost": { "blogPost": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"blogTitle": "Publication title", "blogTitle": "Publication title",
"collections": [], "collections": [],
@ -182,7 +182,7 @@
"book": { "book": {
"ISBN": "978-1-234-56789-7", "ISBN": "978-1-234-56789-7",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -243,7 +243,7 @@
"bookSection": { "bookSection": {
"ISBN": "978-1-234-56789-7", "ISBN": "978-1-234-56789-7",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -309,7 +309,7 @@
}, },
"case": { "case": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"caseName": "Title", "caseName": "Title",
"collections": [], "collections": [],
@ -354,7 +354,7 @@
"computerProgram": { "computerProgram": {
"ISBN": "978-1-234-56789-7", "ISBN": "978-1-234-56789-7",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -398,7 +398,7 @@
"DOI": "10.1234/example.doi", "DOI": "10.1234/example.doi",
"ISBN": "978-1-234-56789-7", "ISBN": "978-1-234-56789-7",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -458,7 +458,7 @@
"dictionaryEntry": { "dictionaryEntry": {
"ISBN": "978-1-234-56789-7", "ISBN": "978-1-234-56789-7",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -519,7 +519,7 @@
}, },
"document": { "document": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -572,7 +572,7 @@
}, },
"email": { "email": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"collections": [], "collections": [],
"creators": [ "creators": [
@ -611,7 +611,7 @@
"encyclopediaArticle": { "encyclopediaArticle": {
"ISBN": "978-1-234-56789-7", "ISBN": "978-1-234-56789-7",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -672,7 +672,7 @@
}, },
"film": { "film": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -723,7 +723,7 @@
}, },
"forumPost": { "forumPost": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"collections": [], "collections": [],
"creators": [ "creators": [
@ -758,7 +758,7 @@
}, },
"hearing": { "hearing": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"collections": [], "collections": [],
"committee": "Committee", "committee": "Committee",
@ -795,7 +795,7 @@
}, },
"instantMessage": { "instantMessage": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"collections": [], "collections": [],
"creators": [ "creators": [
@ -833,7 +833,7 @@
}, },
"interview": { "interview": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -883,7 +883,7 @@
"DOI": "10.1234/example.doi", "DOI": "10.1234/example.doi",
"ISSN": "1234-5679", "ISSN": "1234-5679",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -943,7 +943,7 @@
}, },
"letter": { "letter": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -987,7 +987,7 @@
"magazineArticle": { "magazineArticle": {
"ISSN": "1234-5679", "ISSN": "1234-5679",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -1038,7 +1038,7 @@
}, },
"manuscript": { "manuscript": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -1084,7 +1084,7 @@
"map": { "map": {
"ISBN": "978-1-234-56789-7", "ISBN": "978-1-234-56789-7",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -1133,7 +1133,7 @@
"newspaperArticle": { "newspaperArticle": {
"ISSN": "1234-5679", "ISSN": "1234-5679",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -1185,7 +1185,7 @@
}, },
"patent": { "patent": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"applicationNumber": "Application number", "applicationNumber": "Application number",
"assignee": "Assignee", "assignee": "Assignee",
"attachments": [], "attachments": [],
@ -1234,7 +1234,7 @@
}, },
"podcast": { "podcast": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"audioFileType": "Medium", "audioFileType": "Medium",
"collections": [], "collections": [],
@ -1275,7 +1275,7 @@
}, },
"presentation": { "presentation": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"collections": [], "collections": [],
"creators": [ "creators": [
@ -1311,7 +1311,7 @@
}, },
"radioBroadcast": { "radioBroadcast": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -1374,7 +1374,7 @@
}, },
"report": { "report": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -1427,7 +1427,7 @@
}, },
"statute": { "statute": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"code": "Code", "code": "Code",
"codeNumber": "Code number", "codeNumber": "Code number",
@ -1467,7 +1467,7 @@
}, },
"thesis": { "thesis": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -1508,7 +1508,7 @@
}, },
"tvBroadcast": { "tvBroadcast": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -1572,7 +1572,7 @@
"videoRecording": { "videoRecording": {
"ISBN": "978-1-234-56789-7", "ISBN": "978-1-234-56789-7",
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"archive": "Archive", "archive": "Archive",
"archiveLocation": "Archive location", "archiveLocation": "Archive location",
"attachments": [], "attachments": [],
@ -1631,7 +1631,7 @@
}, },
"webpage": { "webpage": {
"abstractNote": "Abstract note", "abstractNote": "Abstract note",
"accessDate": "1997-06-13T19:59:58Z", "accessDate": "1997-06-13T23:59:58Z",
"attachments": [], "attachments": [],
"collections": [], "collections": [],
"creators": [ "creators": [