From 914a54e92d4cae6fee627ff3641d6a8c59635bb7 Mon Sep 17 00:00:00 2001 From: Alex Weidmann Date: Sat, 4 Apr 2015 18:56:43 -0600 Subject: [PATCH] Respect configured timezone in rails apps --- CHANGELOG.md | 6 ++++++ lib/sidetiq/clock.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d403ef5..ad5de09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +0.6.4 +----- + +- Use Time.current instead of Time.now in rails apps to + respect configured timezone [effektz] + 0.6.3 ----- diff --git a/lib/sidetiq/clock.rb b/lib/sidetiq/clock.rb index 4d0a1b4..12e104f 100644 --- a/lib/sidetiq/clock.rb +++ b/lib/sidetiq/clock.rb @@ -57,7 +57,7 @@ module Sidetiq # # Returns a Time instance. def gettime - Sidetiq.config.utc ? Time.now.utc : Time.now + Sidetiq.config.utc ? Time.now.utc : (Time.respond_to?(:current) ? Time.current : Time.now) end end end