[ Premise: If you think adding something to LO code is easy, you are still an
inexperienced LO developer. ]
#include <tools/time.hxx>
...
printf( "%d\n", Time( 25, 0, 0 ).GetHour());
printf( "%d\n", ( Time( 1, 0, 10 ) - Time( 1, 0, 20 )).GetSec());
25
10
As much as I don't like it, I can possibly see at least some reason for time
having 25 hours, but 10 seconds without 20 seconds being 10 seconds (and
there is actually explicit code to ensure that)?
Does somebody know why the Time class does either of these and how much would
break if I fixed these two to be sane?
--
Lubos Lunak
l.lunak@suse.cz
Context
- [Libreoffice] Class Time and its funny ideas about time · Lubos Lunak
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.