Skip to content

Commit

Permalink
fixing Time.now to be Time.zone.now to honor the app set local TimeZone
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Matheson committed Oct 12, 2009
1 parent 266fc15 commit bee4713
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/delayed/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def attempt_to_load(klass)
# Note: This does not ping the DB to get the time, so all your clients
# must have syncronized clocks.
def self.db_time_now
(ActiveRecord::Base.default_timezone == :utc) ? Time.now.utc : Time.now
(ActiveRecord::Base.default_timezone == :utc) ? Time.now.utc : Time.zone.now
end

protected
Expand Down

0 comments on commit bee4713

Please sign in to comment.