Fix time zone handling of CSL JSON export of date-only access date
Since 9c0f5998a3
, depending on your timezone the day could be off by
one if the access date didn't have a timestamp (so only for manual
entries or imports).
This commit is contained in:
parent
03941dafe0
commit
09b7fa8a6d
1 changed files with 2 additions and 2 deletions
|
@ -1687,9 +1687,9 @@ Zotero.Utilities = {
|
||||||
|
|
||||||
if(date) {
|
if(date) {
|
||||||
// Convert UTC timestamp to local timestamp for access date
|
// Convert UTC timestamp to local timestamp for access date
|
||||||
if (CSL_DATE_MAPPINGS[variable] == 'accessDate') {
|
if (CSL_DATE_MAPPINGS[variable] == 'accessDate' && !Zotero.Date.isSQLDate(date)) {
|
||||||
// Accept ISO date
|
// Accept ISO date
|
||||||
if (Zotero.Date.isISODate(date) && !Zotero.Date.isSQLDate(date)) {
|
if (Zotero.Date.isISODate(date)) {
|
||||||
let d = Zotero.Date.isoToDate(date);
|
let d = Zotero.Date.isoToDate(date);
|
||||||
date = Zotero.Date.dateToSQL(d, true);
|
date = Zotero.Date.dateToSQL(d, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue