summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2013-06-24 13:52:44 +0100
committerSteve Kemp <steve@steve.org.uk>2013-06-24 13:52:44 +0100
commitd5bdfdb5c40ef4d9df9ee8c01b4b621642611ec1 (patch)
tree415403be9903b350eb1ec036c6c7edbe9550d1d8 /lib
parent1e27c60e5db7297948f80c9134b1bf5153b19c69 (diff)
The worst-case for testing a time-period, and one used in the
parser test, is matching against a period that covers the full 24 hours. Correctly terminate this case, and add a new test-case to ensure that this is always correct.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/custodian/util/timespan.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/custodian/util/timespan.rb b/lib/custodian/util/timespan.rb
index a43ca55..27ece7a 100755
--- a/lib/custodian/util/timespan.rb
+++ b/lib/custodian/util/timespan.rb
@@ -78,7 +78,7 @@ module Custodian
while( hour != p_end )
valid[hour] = 1
hour += 1
- hour = 0 if ( hour >= 23 )
+ hour = 0 if ( hour > 23 )
end
valid[p_end]=1