[Upstream] Dates in cell change randomly on load

Bug #1345546 reported by AZ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LibreOffice
Invalid
Medium
libreoffice (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Problem description:

Steps to reproduce:
0. This is on Ubuntu x86_64 in german local, I did not test others.
1. Set Settings -> Libreoffice Calc -> "Berechnen" (Calculation?) -> Date = 1.1.1904
2. Create new spreadsheet
3. Enter 2.6.2014 in the cell (here: german date format, maybe 2014-06-02 in English)
4. Save file
5. Close file
6. Reopen file
7. Display file
8. save the file

Current behavior:

After step 4, 2014-06-02 is saved in content.xml in the ods file:
<table:table-cell office:value-type="date" office:date-value="2014-06-02" calcext:value-type="date">
 <text:p>02.06.14</text:p>
</table:table-cell>

But it step 7, it is display as 1.6.2010 (that is 2010-06-01) .

After saving in step 8, content.xml contains:
 <table:table-cell office:value-type="date" office:date-value="2010-06-01" calcext:value-type="date">
   <text:p>01.06.10</text:p>
 </table:table-cell>

The current mode of operation breaks file display and corrupts the original file!

Expected behavior:

The date should not change, neither while displaying nor when saving the file.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: libreoffice-calc 1:4.2.4-0ubuntu2
Uname: Linux 3.15.0-031500rc7-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: KDE
Date: Sun Jul 20 12:58:26 2014
SourcePackage: libreoffice
UpgradeStatus: Upgraded to trusty on 2014-06-18 (31 days ago)

Revision history for this message
In , AZ (m-dev) wrote :

Problem description:

Steps to reproduce:
0. This is on Ubuntu x86_64 in german local, I did not test others.
1. Set Settings -> Libreoffice Calc -> "Berechnen" (Calculation?) -> Date = 1.1.1904
2. Create new spreadsheet
3. Enter 2.6.2014 in the cell (here: german date format, maybe 2014-06-02 in English)
4. Save file
5. Close file
6. Reopen file
7. Display file
8. save the file

Current behavior:

After step 4, 2014-06-02 is saved in content.xml in the ods file:
<table:table-cell office:value-type="date" office:date-value="2014-06-02" calcext:value-type="date">
 <text:p>02.06.14</text:p>
</table:table-cell>

But it step 7, it is display as 1.6.2010 (that is 2010-06-01) .

After saving in step 8, content.xml contains:
 <table:table-cell office:value-type="date" office:date-value="2010-06-01" calcext:value-type="date">
   <text:p>01.06.10</text:p>
 </table:table-cell>

The current mode of operation breaks file display and corrupts the original file!

Expected behavior:

The date should not change, neither while displaying or when saving the file.

Revision history for this message
AZ (m-dev) wrote :
Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , sophie (gautier-sophie) wrote :

Hi, I was not able to reproduce. Does it happen with all your files or only specific one? Could you provide the file that shows the error? Thanks - Sophie

Revision history for this message
In , AZ (m-dev) wrote :

It happened with a specific one copied from another computer but I was able to reproduce this creating a new one.

Revision history for this message
In , Stgohi-lobugs (stgohi-lobugs) wrote :

for me not reproducible with LO 4.3.0.4 (Win 8.1), therefore it is maybe an Ubuntu only issue in case it is reproducible

Step 1: TOOLS -> OPTIONS -> LIBREOFFICE CALC -> CALCULATE

Revision history for this message
In , Jmadero-dev (jmadero-dev) wrote :

I cannot confirm:
Bodhi Linux 2.x (built on Ubuntu 12.04)
LibreOffice 4.3.1.2 release

Please try the following:
https://wiki.documentfoundation.org/UserProfile

and try installing 4.3.

With three QA members now committing time and not being able to reproduce - I'm afraid that this might be your computer environment causing something to happen and therefore WORKSFORME. That being said, for now throwing in NEEDINFO - try the above steps and if you still see the problem mark as UNCONFIRMED and we'll see where to go from there.

Changed in df-libreoffice:
status: New → Incomplete
penalvch (penalvch)
summary: - dates in cell change randomly on load
+ [Upstream] Dates in cell change randomly on load
Revision history for this message
In , AZ (m-dev) wrote :

ok, please give me some time.

Revision history for this message
In , AZ (m-dev) wrote :

Created attachment 106048
screencast showing the change of the date when changing the setting

This is on yet another machine, running ubuntu mint 16 with a fresh profile.
It shows that the displayed date changes too when changing the setting. it is libreoffice 4.1

Revision history for this message
In , AZ (m-dev) wrote :

Created attachment 106050
screencast again showing libreoffice 4.3

this is on ubuntu mint again, the old libreoffice profile has been removed in advance, and a new libreoffice 4.3 version from libreoffice.org installed.

Revision history for this message
In , JBF (jbf-faure) wrote :

(In reply to comment #6)
> Created attachment 106048 [details]
> screencast showing the change of the date when changing the setting
>
> This is on yet another machine, running ubuntu mint 16 with a fresh profile.
> It shows that the displayed date changes too when changing the setting. it
> is libreoffice 4.1

Yes, where is the problem ? the origin date is saved in the file, if you change it, the dates change accordingly because each date is an amount of days from the origin date.
Why do you want to change the origin date for an existing file ?

Closing as NotABug. Please feel free to reopen if you have an argument against this explanation.

Best regards. JBF

Revision history for this message
In , AZ (m-dev) wrote :

What I can reproduce on another machine is:
1. create a file (ods) with default date settings
2. close file
3. change date setting
4. open file and find a different date displayed.

I don't understand why this is happening, because the content.xml says
  <table:table-cell office:value-type="date" office:date-value="2014-01-01" calcext:value-type="date">
     <text:p>01.01.14</text:p>
  </table:table-cell>

which is no relative date.

Revision history for this message
In , AZ (m-dev) wrote :

Further, I would expect that change to only affect ambiguous dates (in file formats that do not use four digit years, for example) - because what is the point in changing a date based on a program setting? Or maybe when actually doing some calculation, because this setting is in the "calculate" section.

Further, one can only change this setting with a calc file open (otherwise the menu is missing) - so it will always affect a file.

Revision history for this message
In , JBF (jbf-faure) wrote :

1/ How do you change date setting if the file is closed ?

2/ where is random ? All changes are made by you, Calc does only what you asked him to do.

3/ the origin date is saved in the content.xml if it is not the standard origin date (1899.12.30). Open such a content.xml and search for "null-date".

4/ when reading a file Calc converts dates to numbers (decimal) of days from the null-date. It converts back to dates when formatting and saving.

Set status to NEEDINFO. Please set it back to UNCONFIRMED once you have provided requested informations. Thank you for your understanding.

Best regards. JBF

Revision history for this message
In , AZ (m-dev) wrote :

1/ How do you change date setting if the file is closed ?

I created (opened) a new file (not saved) and changed it then. The change shows up in user/registrymodifications.xcu .

2/ where is random ? All changes are made by you, Calc does only what you asked him to do.

I originally did what I wrote in steps to reproduce. Originally, I first had a document created on another computer that showed up with wrong dates. Then I found that even documents created locally showed wrong dates. After changing the setting mentioned back to defaults, the issue was gone. But it could be reproduced by the steps mentioned in "steps to reproduce". So I thought this was an unacceptable issue with libreoffice.

I'm now facing difficulties to reproduce this even on the machine that originally exhibited this behaviour (which does not always even have internet access). So I don't know how to debug this further.

Regardless of the original issue, I find it very strange as a user that changing that very setting changes the static! document content. I think this is not easy to see as a user (when going through menu) and does not only affect calculations as one could expect from menu structure.

3/ the origin date is saved in the content.xml if it is not the standard origin date (1899.12.30). Open such a content.xml and search for "null-date".

thanks for pointing that out.

4/ when reading a file Calc converts dates to numbers (decimal) of days from the null-date. It converts back to dates when formatting and saving.

I think it would improve user experience when changing that setting would not alter static (non-calculated) content.

Set status to NEEDINFO. Please set it back to UNCONFIRMED once you have provided requested informations. Thank you for your understanding.

Changed in df-libreoffice:
status: Incomplete → New
Revision history for this message
In , JBF (jbf-faure) wrote :

(In reply to comment #12)
> [...]
> I'm now facing difficulties to reproduce this even on the machine that
> originally exhibited this behaviour (which does not always even have
> internet access). So I don't know how to debug this further.

Ok, so closing again as NotABug. Please fell free to reopen if the problem comes back for you.

Best regards. JBF

Changed in df-libreoffice:
status: New → Invalid
Changed in libreoffice (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.