[upstream] [hardy] oo-calc - formatting cell from decimal number to format "dd:hh:mm:ss" report wrong day

Bug #238822 reported by FabioXXL
Affects Status Importance Assigned to Milestone
openoffice.org (Ubuntu)

Bug Description

Binary package hint: openoffice.org

I have a cell with a decimal rapresentation of a number of day: .ie 7,6 days
If I choose to format the cell with a custom format code like "dd:hh:mm:ss" the result is -> 06:14:02:40
The day is always one less of the the right one.
The same problem result using the function =TEXT(cell;"dd:hh:mm:ss")
I have checked in Excel and here work right.

I'm using the standard package present in Ubuntu Hardy 1:2.4.0-T3ubuntu6
The Ubuntu release is 8.04

ProblemType: Bug
Architecture: i386
Date: Tue Jun 10 11:48:01 2008
DistroRelease: Ubuntu 8.04
NonfreeKernelModules: nvidia
Package: openoffice.org-core 1:2.4.0-3ubuntu6
PackageArchitecture: i386
SourcePackage: openoffice.org
Uname: Linux 2.6.24-18-server i686

Revision history for this message
FabioXXL (fabio-sabatti) wrote :
Revision history for this message
LimCore (limcore) wrote :

Providing a small testcase (.odt or similar with a MINIMAL document that demonstrates this bug) would be helpfull

Revision history for this message
Brian Murray (brian-murray) wrote :

I've created a test document illustrating the problem. It shows the calculation for HH:MM:SS and DD HH:MM:SS using numbers 1-31. Interestingly, 24 hours shows up as 31 days.

Revision history for this message
Brian Murray (brian-murray) wrote :

I've created a test document that demonstrates this bug and attached it to this bug report. Additionally, I've verified that this problem exists with openoffice.org from -proposed for Hardy. That package version is 1:2.4.1-1ubuntu1.

Changed in openoffice.org:
importance: Undecided → Medium
status: New → Confirmed
Changed in openoffice.org:
status: Confirmed → Triaged
Revision history for this message
Chris Cheney (ccheney) wrote :

Confirmed on upstream's openoffice.org 3.0beta as well.

Revision history for this message
Vorona (erikmartre) wrote :

I am using Base of OOo ; a recent update (probably in may when I uninstalled a previous version and upgraded Ubuntu to Hardy Heron) caused all the dates that had been entered before to be changed for the day before.

Now when I fomat the cells to display the rough number instead of the date dd/mm/yy (in fact jj/mm/aa in french) I notice that it is this data itself that has been changed and not only when it is displayed as a date. For instance I had entered 28/05/08 and it became 27/05/08, the decimal number for the day is 39593. Then I entered 26/05/08 (after having upgraded) and it did'nt changed, the number is 39592. My options for the date zero (or one ?) are set to "default" (30/12/1899).

Something interesting : in fact on Calc (in the same system), 27/05/08 is not 39593 but 39595 !!! Not even 39594 ! Strange !

Revision history for this message
Vorona (erikmartre) wrote :

In fact I'm not sure at all that it is the same bug.

I notice today that the problem with Base is related to which JRE is activated. With JRE 1.5 instead of 1.6, the dates are the good ones again ; that means that the ones I typed before may are changed back to the good ones, while the recent ones are not affected. But when I format the column as a decimal number, there is still a difference with the dates in Calc.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

I've sent this upstream at http://www.openoffice.org/issues/show_bug.cgi?id=94476 ; thanks for reporting.

Changed in openoffice:
importance: Undecided → Unknown
status: New → Unknown
Revision history for this message
Pedro Villavicencio (pedro) wrote :

comment from upstream:

"I cannot confirm it. I use German OOo3.0RC3 on WinXP. I open your document and
it shows for the number 1 the date 31.12.1899 (which is 1899-12-31 in ISO). That
is correct, because the basis day is 30.12.1899 (ISO 1899-12-30) and 1 is one
day from the basis day.

What is your setting in Tools > Options > Calc > Calculate?
What setting has OOo, when the document was created?
Is it a new, original ods-document or is it converted from another file format?

Changed in openoffice.org:
status: Triaged → Incomplete
Revision history for this message
Chris Cheney (ccheney) wrote :

There seems to be some confusion on what DD HH:MM:SS actually shows. It shows the date based off the basis day of 1899-12-30, which means 31 is correct.

Changed in openoffice.org:
status: Incomplete → Invalid
Changed in openoffice:
status: Unknown → 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.