zotero / zotero

Zotero is a free, easy-to-use tool to help you collect, organize, annotate, cite, and share your research sources.
https://www.zotero.org
Other
10.29k stars 757 forks source link

Dates entered "dd-mm-yyyy" can become "mm-dd-yyyy" on locale switch #1460

Open fbennett opened 6 years ago

fbennett commented 6 years ago

itemToCSLJSON() currently generates dates by reparsing the free-form string to an object, from which the CSL data object is generated. This works fine, unless the value entered was ambiguous across locales. If "01-06-1999" is entered with a US Zotero.locale (to render as "Jan. 6, 1999", say), and user then switches the UI to French locale, the data sent to the processor will instead render "June 1, 1999").

I've heard that a reimplementation of date handling may be coming in Z 5.1. This may be a known issue that can wait until that lands, but I thought I'd flag it just in case.

fbennett commented 6 years ago

Just realized that the free-form string is shared via sync, so two users running Zotero with different UI locales against the same library source can get different dates in the same item. That seems like something that could easily occur in the wild.