Apache OpenOffice (AOO) Bugzilla – Issue 22438
StarBasic Function Second returns wrong results
Last modified: 2013-08-07 15:12:27 UTC
I am using OpenOffice 1.1.0 (german localization) and found following bug in the spreadsheet application if I use the function Sekunde (second) for time like 00:00:00, 00:00:01, ...) I get the expected results (0, 1, ...) If I write a StarBasic Macro and which basically is Function mySecond(aTime) s = Second(aTime) mySecond = s End Function the input data 00:00:00, 00:00:01, 00:00:02, ... 00:00:59, 00:01:00, 00:01:01 leads to following results 0, 0, 1, ... 58, 0, 0 which looks wrong to me.
Hi Andreas, JSK said it's your construction site. So please have a look. Frank
Uuuuppppssss, Prio to high and target set Frank
AB->SWITO: Sorry, I cannot reproduce this. On my system I get: msgbox Second( "00:00:00" ) -> 0 msgbox Second( "00:00:01" ) -> 1 msgbox Second( "00:00:02" ) -> 2 Or what exactly was your input? You wrote "for input data 00:00:00...", but in which format/type? Maybe you can provide a complete example.
This routine shows that Basic function Second is not working: Sub MainS Dim x As Long, y As Long, y2 As Long, z1 As Date for x = 0 to 59 z1 = TimeSerial(12, 30, x) y = Second(z1) y2= CLng(CDbl(z1)*86400) Mod 60 if x<>y then print "Second " & x, y, y2 next End Sub This Sub displays only incorrect values for y. The calculation with y2 retrieves the correct value. The same problem appears with functions Minute and Hour.
Created attachment 12367 [details] Three macros to demonstrate Second, Minute, Hour bugs
Hi, I don't think this is related to speadsheet project ? Can we change the target component to say ... udk ? Laurent
Reassigned as new info was introduced. Farnk
Created attachment 12376 [details] Rev 2 of my macros, showing the bug and a Basic solution
Ok, I can reproduce the problem -> Started
According to the roadmap of OpenOffice.org 2.0 (http://tools.openoffice.org/releases/q-concept.html) this issue has been scheduled for 3.0.
Today I have run again the macro in Module2 of SecMinHoursBugV2.sxw The macro works OK in OOo 1.1.4 and OOo 1.9.113 which means the functions Second Minute and Hour are now correct. Apparently someone has corrected the bug without updating this issue. Can a developer check this and change Issue status and Target Milestone?
I also cannot reproduce this task any more. Probably this fix is a side effect from another fix. -> Set to FIXED
The Issue you raised has been marked as 'Resolved' and not updated within the last 1 year+. I am therefore setting this issue to 'Verified' as the first step towards Closing it. If you feel this is incorrect, please re-open the issue and add any comments. Many thanks, Andrew Cleaning-up and Closing old Issues ~ The Grand Bug Squash, pre v3 ~ http://marketing.openoffice.org/3.0/announcementbeta.html
As per previous posting: Verified -> Closed. A Closed Issue is a Happy Issue (TM). Regards, Andrew