Description: 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. Actual Results: The Calc version of the MINUTE function returns a 9 minutes difference, the StarBasic version 10 minutes. Expected Results: Both versions of the MINUTE function should return 10 minutes as this is the difference between 18 and 8. Reproducible: Always User Profile Reset: No Additional Info: Calc Version: 6.4.3.2, 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?