From 0b384abe66b5fca38049f5a9b39ef62ef1108b4b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 1 Apr 2018 07:45:11 -0400 Subject: [PATCH] Fix DST display bug in Accessed and a few other date fields If you entered a date that was in DST (including the current date at 00:00:00) but you were in standard time, the previous day was displayed. Since access dates for saved items include explicit timestamps and most people don't work between the hours of midnight and 3 a.m., this didn't come up very often, and it was easy to miss when it did, since you'd be unlikely to notice it for previously entered dates. (Someone noticed it today because DST ended in Australia.) This only affected the item pane, so citations were unaffected. --- chrome/content/zotero/bindings/itembox.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index 9639e3cf19..ed16f2122c 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -1308,7 +1308,10 @@ if (date) { // If no time, interpret as local, not UTC if (Zotero.Date.isSQLDate(valueText)) { - date = Zotero.Date.sqlToDate(valueText); + // Add time to avoid showing previous day if date is in + // DST (including the current date at 00:00:00) and we're + // in standard time + date = Zotero.Date.sqlToDate(valueText + ' 12:00:00'); valueText = date.toLocaleDateString(); } else {