Bug 132083 shows an unexpected result of a simple date & time calculation. If you feed the very same values into the date & time functions of Calc and StarBasic you will get different results.
Steps to Reproduce:
Open the attachted example file in a context that allows the execution of macros.
The Calc version of the MINUTE function returns a 9 minutes difference, the StarBasic version 10 minutes.
Both versions of the MINUTE function should return 10 minutes as this is the difference between 18 and 8.
User Profile Reset: No
Calc Version: 184.108.40.206, Build-ID: 1:6.4.3-0ubuntu0.20.04.1, CPU-Threads: 4; BS: Linux 5.4; UI-Render: Standard; VCL: gtk3; Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE, Calc: threaded
Created attachment 161278 [details]
Example file demonstrating different results of date & time functions
The usual confusion of timestamp and duration. The example applies the non-rounding MINUTE() wall clock / timestamp spreadsheet function on a time difference or duration value with a slight imprecision.
=A5*24 => 0.166666666388889
=A5*24*60 => 9.99999998333333
I don't know if there is a standard definition (VBA?) for the BASIC Minute() function, but the spreadsheet MINUTE() function is defined to not round, see https://docs.oasis-open.org/office/OpenDocument/v1.3/cs01/part4-formula/OpenDocument-v1.3-cs01-part4-formula.html#MINUTE
The difference between not-/rounding is also visible by applying the HH:MM:SS wall clock number format (00:09:59) instead of the correct [HH]:MM:SS duration format (00:10:00) on A5.
Created attachment 161500 [details]
Example file demonstrating different results of date & time functions update
(In reply to Eike Rathke from comment #2)
> The usual confusion of timestamp and duration.
Did I get timestamp and duration right this time?
Dear Albrecht Müller,
To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.
There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.
If you have time, please do the following:
Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/
If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.
Please DO NOT
Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)
If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/
2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword
Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa
Thank you for helping us make LibreOffice even better for everyone!