[Libreoffice] Class Time and its funny ideas about time
Lubos Lunak
l.lunak at suse.cz
Thu Aug 11 05:43:28 PDT 2011
[ 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 at suse.cz
More information about the LibreOffice
mailing list