From: daurnimator Date: Mon, 22 Jul 2013 21:48:25 +0000 (-0400) Subject: src/tzinfo: Fencepost bug X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/fdc736b35e4525fffa01fc2f20403997f2626381?ds=sidebyside;hp=b6b491d8f9d82f15f6b807efa95c8f2f4ceebd78 src/tzinfo: Fencepost bug --- diff --git a/src/tzinfo.lua b/src/tzinfo.lua index 468694d..d347e05 100644 --- a/src/tzinfo.lua +++ b/src/tzinfo.lua @@ -11,7 +11,7 @@ local function _find_current ( tzinfo , target , i , j ) local half = math.ceil ( (j+i) / 2 ) - if target > tzinfo [ half ].transition_time then + if target >= tzinfo [ half ].transition_time then return _find_current ( tzinfo , target , half , j ) else return _find_current ( tzinfo , target , i , half-1 )