I have a Libre Office calc document (documentX.ods) where from time to time I paste calc date fields obtained from a documentY.csv file. When I open the .csv file directly from the Windows 10 operating system, Windows has the association between the .csv extension and Libre Office and opens Libre Office. When I copy a range of date fields from the opened documentY.csv file to the the other documentX.ods file, the dates are wrongly pasted, with years of difference.
I noticed that the base date in the documentX.ods file ( menu→tools→options→ Libre Office Calc→ Calculate → Date) is 12/30/1899 (the default date). The base date in the opened documentY.csv file is 01/01/1904. This explains why I get wrongly pasted values in documentX.ods.
But… if I open the documentY.csv differently, i.e. I create first a new calc document from Libre Office and then open documentY.csv from there, I get as base date the default 12/30/1899 date! For some unknown reason Libre Office when started from Windows via the association with the .csv file uses as base date 01/01/1904 instead of the default. If I force a change to the default date of 12/30/1899 and apply the change, it refuses and returns to the 01/01/1904 date!
This anomaly happens with both LibreOffice_7.0.3_Win_x64 and LibreOffice_7.1.1_Win_x64.
Does anyone know how to avoid this anomaly other than avoiding opening the .csv file directly from Windows?