From 9b9c186b4c09584f9159c2cbcfc4d34a9d7d121f Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 23 Jan 2012 13:16:58 -0500 Subject: [PATCH] More accessDate debugging --- chrome/content/zotero/bindings/itembox.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index bce5330a68..9d862a7e0c 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -1260,21 +1260,30 @@ case 'dateSent': case 'dateDue': case 'accepted': + Zotero.debug('============'); + Zotero.debug(fieldName); + Zotero.debug(valueText); if (valueText) { var date = Zotero.Date.sqlToDate(valueText, true); + Zotero.debug(date + ''); if (date) { // If no time, interpret as local, not UTC if (Zotero.Date.isSQLDate(valueText)) { + Zotero.debug('='); date = Zotero.Date.sqlToDate(valueText); + Zotero.debug(date + ''); valueText = date.toLocaleDateString(); } else { + Zotero.debug('-'); valueText = date.toLocaleString(); } } else { valueText = ''; } + Zotero.debug('=='); + Zotero.debug(valueText); } break; } @@ -1860,12 +1869,6 @@ this._modifyField(fieldName, value, this.saveOnEdit); - if (fieldName == 'accessDate') { - Zotero.debug('========'); - Zotero.debug(value); - Zotero.debug(this.item.getField(fieldName)); - } - elem = this.createValueElement( this.item.getField(fieldName), fieldName,