Permalink
Browse files

fixing Time.now to be Time.zone.now to honor the app set local TimeZone

  • Loading branch information...
1 parent 266fc15 commit bee4713c9dd9ab81d85c4d5a8110d4c3e51789eb Tim Matheson committed Oct 12, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/delayed/job.rb
View
@@ -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

0 comments on commit bee4713

Please sign in to comment.