From 47553e81196c4d271334ff2c5f7e9f31f8a66f57 Mon Sep 17 00:00:00 2001 From: Matt Langlois Date: Mon, 12 Aug 2019 18:47:34 -0600 Subject: [PATCH] Use ruby's time so we're compatable with things like timecop --- lib/github/kv.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github/kv.rb b/lib/github/kv.rb index ba9b296..20b6757 100644 --- a/lib/github/kv.rb +++ b/lib/github/kv.rb @@ -290,7 +290,7 @@ module GitHub `value`=IF( concat('',`value`*1) = `value`, LAST_INSERT_ID(IF( - `expires_at` IS NULL OR `expires_at`>=NOW(), + `expires_at` IS NULL OR `expires_at`>=:now, `value`+:amount, :amount )),