Libray sorting issue

Hello,
i'm experiencing an issue with Zotero 5 (last update) library sorting on my pc (while the same library works on my laptop).
I try to sort elements by date, but the result is still a messy list.
Ex:
7/4/1962
7/6/1962
7/9/1962
14/7/1962
even if in the date scheme is correctly recognised (d m y) in every record.
What can I do?
  • edited May 13, 2018
    even if in the date scheme is correctly recognised (d m y) in every record
    Are you sure about that? If you look at the 7/4/1962 record on the PC, it shows "d m y"? What does it show when you hover over the Date field?

    What's the locale of the PC? The above behavior would happen if the locale was set to en-US, because 7/4/1962 would be interpreted as July 4th, while 14/7/1962 would be interpreted as July 14th (because there's no alternative).
  • As a workaround, you can store ambiguous dates as YYYY-MM-DD (which is generally how items should be saved when you use "Save to Zotero" in the Zotero Connector), though that shouldn't be necessary if the PC is set to dd/mm/yyyy.
  • I'm sure: it shows "d m y". If I clik on the date field and then I clik out the record gets the right place in the list. As this library is made of more 1700 records I can't manually refresh all of them...

    PC and Zotero locale is it-IT.

    The "strange" thing is that with same settings zotero is perfectly working on my laptop.
  • edited May 14, 2018
    If I clik on the date field and then I clik out the record gets the right place in the list.
    That actually sounds more like it's wrong on the laptop. Basically, Zotero parses ambiguous dates according to your current locale and stores a YYYY-MM-DD version of the date that it uses for sorting, separate from what's displayed in the field. You can see the stored YYYY-MM-DD by hovering over the field, and if that's wrong then the parsing didn't happen correctly on the computer where you added the item or last edited the field. If you click on a Date field and click away and it changes to the correct value, it means that this computer is actually behaving correctly and it was stored incorrectly somewhere else (or your settings were different when you created items on this computer).
  • edited May 14, 2018
    Same record (sync via Zotero web account):
    - field on laptop: DD-MM-YYYY 05/06/1957
    - mouse over on laptop YYYY-MM-DD 1957-06-05
    - field on PC: DD-MM-YYYY 05/06/1957
    - mouse over on PC: YYYY-DD-MM 1957-05-06.

    Maybe I can reset online library from laptop (because I created all these records with it)?
  • No, don't do that — the server data isn't the issue.

    Since the laptop is correct, my best guess for what happened here is that your PC (or Zotero on this PC) was previously set to a different locale, or for some reason the normal locale logic wasn't working. So when you synced this data to the PC, it was parsed differently.

    If the PC is fully in sync, what you can do is open the Zotero data directory, close Zotero, and move zotero.sqlite out of the way (e.g., to your desktop). Then reopen Zotero and sync (and say yes when it asks if you want to sync to an empty database). It should then pull down your data with your current locale and parse all the dates again properly. You can then delete the backup of zotero.sqlite.
  • Thanks a lot! Now it works well!
Sign In or Register to comment.