From fdc736b35e4525fffa01fc2f20403997f2626381 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 22 Jul 2013 17:48:25 -0400 Subject: [PATCH] src/tzinfo: Fencepost bug --- src/tzinfo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) -- 2.39.5