Description: A format like `HH:MM:SS` should round based on the most granular time. Steps to Reproduce: =TEXT(0.00069,"ss") Actual Results: 59 Expected Results: 00 Reproducible: Always User Profile Reset: Yes Additional Info: Rounding does work with sub-second units. Testing with the value 0.002415: | format | LO | Excel | +:-------+:-------+:-------+ | ss | 28. | 29 | | ss.0 | 28.7 | 28.7 | | ss.00 | 28.66 | 28.66 | | ss.000 | 28.656 | 28.656 |
Not convinced. In LibreOffice, there is explicitly decided difference between wall clock time formats (HH:MM:SS), and duration formats ([SS] or [HH]:MM:SS) - the former do not round, but truncate, because it's not tomorrow until it's tomorrow. But for durations, rounding happens. Compare =TEXT(0.00069;"ss") and =TEXT(0.00069;"[ss]") OTOH: see bug 136615. It even has an abandoned change https://gerrit.libreoffice.org/c/core/+/117924.
Duration formats are currently broken (see https://bugs.documentfoundation.org/show_bug.cgi?id=150028) The assertion "LibreOffice does not round wall clock time formats" is incorrect and an example was included in the "additional info" section: """ Rounding does work with sub-second units. Testing with the value 0.002415: | format | LO | Excel | +:-------+:-------+:-------+ | ss | 28 | 29 | | ss.0 | 28.7 | 28.7 | | ss.00 | 28.66 | 28.66 | | ss.000 | 28.656 | 28.656 | """ To be more explicit, if LO were internally consistent, for the value 0.002415 you would expect the following (written in the reverse order for clarity): "ss.000" -> "28.656" "ss.00" -> "28.65" "ss.0" -> "28.6" "ss" -> "28" However, LO generates the following: "ss.000" -> "28.656" "ss.00" -> "28.66" /* rounding :( */ "ss.0" -> "28.7" /* rounding :( */ "ss" -> "28" /* not rounding */
(In reply to SheetJS from comment #2) I hoped that the idea would be clear without long clarifications. It does not round to seconds (and higher parts), decimals are rounded, which doesn't change the argument.
We should not reintroduce the wrong wall clock time rounding. So this would be a request to also truncate the fraction of seconds to its precision, instead of rounding it.
Version: 7.6.2.1 (X86_64) / LibreOffice Community Build ID: https://buzranker.com CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-CA (en_CA.UTF-8); UI: en-US Calc: threaded