<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Calc changes the cell type from time to date when the format-code is changed"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=136050">136050</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Calc changes the cell type from time to date when the format-code is changed
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>6.4.4.2 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>minor
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Calc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bugs_documentfoundation_org.5.kuru@xoxy.net
</td>
</tr></table>
<p>
<div>
<pre>Description:
I have a calc table where collect data about driving my car. The collected data
is collected as follwing:
km from: The odometer when I leave the start point (accurate to a 10th of a
kilometer - only used for a different bug)
km to: The odometer when I arrive the end point (accurate to a 10th of a
kilometer - only used for a different bug)
time from: The clock when I leave the start point (accurate on the minute)
time to: The clock when I arrive the end point (accurate on the minute)
When I auto calc the time driven (eg. "=D2-C2") the results show up as
[HH]:MM:SS by default. When I change how the time is displayed with the
format-code, the cell type is changed from time to date and the result is
incorrect.
Example:
time from: 17:54
time to: 18:13
The calculation results in:
* [HH]:MM:SS = 00:19:00 (default)
* [HH]:MM = 00:19
* HH:MM = 00:19
* MM:SS = 19:00
* MM = 12
The default [HH]:MM:SS as well as [HH]:MM, HH:MM and MM:SS work fine. When the
format-code is changed to "MM" the displayed result is incorrect.
This can be fixed with "[MM" or "[MM]", but I would expect "MM" to work as
well. I know that "MM" is used in the date-type cells to display the month, so
from the code-logic point of view, it makes sence that that "MM" must represent
a month. However, since HH:MM and MM:SS work fine, it does not make a whole lot
of sence seen from a human-logic point of view.
For this I have no idea how I would fix this - or what I would expect the
program to do. Maybe CALC could add square brackets by default when you edit
the cell as time-time and only if you switch to the date type by hand you can
get rid of them.
Steps to Reproduce:
1. Enter a time like 00:19:00
2. Change the cell format-code from "[HH]:MM:SS" to "MM"
Actual Results:
The result is displayed as month "12"
Expected Results:
The result should display only the mintes "19"
Reproducible: Always
User Profile Reset: No
Additional Info:
Version: 6.4.4.2 (x64)
Build-ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU-Threads: 6; BS: Windows 6.1 Service Pack 1 Build 7601; UI-Render: Standard;
VCL: win;
Gebietsschema: de-AT (de_AT); UI-Sprache: de-DE
Calc: CL
----
I know that I should use the latest version of LO for this, but right now, I'm
short on time. I test this with the lastest version of the 7.x branch once I
had time to deal with it. However, I expect the results to be the same.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>