Hello, All.

I have been working on a port off of the Adobe engine onto OpenBD but
have run into a bug with CFLOOP I think.  I don't mind posting it in
the issues tracker but wanted to see if others can reproduce it first.

I am trying to loop over the time, either hourly or by 15 minutes from
10 am to 3 am (the clients hours of operations).  To do this with the
Adobe engine I break the loops up into two, one for up to midnight and
the second for after.  To change the intervals I adjust the
createTimespan settings.

When the time span is 10, 20 30 or 40 minutes it loops as desired.
The bug I run into is that when the time span is 5, 15, or 60 minutes
it doesn't work correctly.  Instead of getting 10:00am, 10:15am,
10:30am, 10:45am, etc I get 10:00am, 10:14am, 10:29am, 10:44am, etc.
Setting the time span to an hour either with createTimespan(0,1,0,0)
or createTimespan(0,0,60,0) give me 10:00am, 10:59am, 11:59am,
12:59pm, etc

Can anyone reproduce this?  It has been a royal pain this week and
took me a couple of days to track this down to explain why report
numbers are not coming up correctly.  I hope this is reproducible.

<cfset oInterval = #createTimespan(0,1,0,0)#>

<cfloop index="dtTime" from="10:00 AM" to="11:59 PM"
step="#oInterval#">
    #TimeFormat( dtTime, "h:mm TT" )# <br/>
</cfloop>

<cfloop index="dtTime" from="00:00 AM" to="03:59 AM"
step="#oInterval#">
    #TimeFormat( dtTime, "h:mm TT" )# <br/>
</cfloop>

Thanks for your help

Scott

-- 
official tag/function reference: http://openbd.org/manual/
 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to