Bug 158737 - Calc - date formatting creating wrong date when using reference to cell on other sheet
Summary: Calc - date formatting creating wrong date when using reference to cell on ot...
Status: NEEDINFO
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-16 21:50 UTC by bunkem
Modified: 2023-12-16 22:57 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of two sheets showing incorrect format of date (672.60 KB, image/png)
2023-12-16 21:59 UTC, bunkem
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bunkem 2023-12-16 21:50:54 UTC
Description:
This is the strangest thing I've seen in Calc.
I have put the date on the first sheet and reference that cell using =Sheet1!cellNo onto the following 3 sheets. (please see attached screenshot)
You will see on the first sheet the date is Dec 15, 2023 (shown as 2023-12-15)
On the right side you see sheet 3 that should have the same date as it is linked to the date in the first sheet.  But that date show 2023-12-23.
I expect that the date should be the same on every sheet.

I've noticed that this happens only on the first time you change the date format on the linked cell.  If you change the format to another date format and then change it back, the proper date is shown.  Strange!

Steps to Reproduce:
1. Add date on first sheet 
2. Format as YYYY-MM-DD
3. reference the cell with the date on another sheet
4. format as YYYY-MM-DD
5. Check if the date is the same.

Actual Results:
Wrong date is shown.

Expected Results:
Exactly the same date since they are both using the same cell data.


Reproducible: Didn't try


User Profile Reset: No

Additional Info:
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 8; OS: Mac OS X 12.7.2; UI render: default; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded
Comment 1 bunkem 2023-12-16 21:59:08 UTC
Created attachment 191462 [details]
Screenshot of two sheets showing incorrect format of date
Comment 2 m_a_riosv 2023-12-16 22:57:04 UTC
I can't reproduce even with 'Autocalculate' disable:
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded

Please attach a sample file?
Comment 3 m_a_riosv 2023-12-16 22:57:26 UTC
Please test in safe mode, Menu/Help/Restart in Safe Mode