[Libreoffice-bugs] [Bug 114229] Basic -timeserial function minutes outside the range 0-59

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Aug 29 06:58:49 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=114229

--- Comment #14 from Andreas Heinisch <andreas.heinisch at yahoo.de> ---
The current implementation is here:

https://opengrok.libreoffice.org/xref/core/basic/source/runtime/methods.cxx?r=7201db41#1981

sal_Int16 nHour = rPar.Get(1)->GetInteger();
if ( nHour == 24 )
{
    nHour = 0;                      // because of UNO DateTimes, which go till
24 o'clock
}
sal_Int16 nMinute = rPar.Get(2)->GetInteger();
sal_Int16 nSecond = rPar.Get(3)->GetInteger();
if ((nHour < 0 || nHour > 23)   ||
    (nMinute < 0 || nMinute > 59 )  ||
    (nSecond < 0 || nSecond > 59 ))
{
    StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
    return;
}

So we have just to agree on the behaviour of the function :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190829/e24c49ff/attachment.html>


More information about the Libreoffice-bugs mailing list