Converted to use Rails Time.zone only to honor app time zone

This commit is contained in:
Priit Tark 2015-04-06 13:47:18 +03:00
parent a42136268f
commit e1041da50f
16 changed files with 34 additions and 31 deletions

View file

@ -49,7 +49,7 @@ class Domain < ActiveRecord::Base
before_create :set_validity_dates
before_save :touch_always_version
def touch_always_version
self.updated_at = Time.now
self.updated_at = Time.zone.now
end
after_save :manage_automatic_statuses
after_save :update_whois_body
@ -205,7 +205,7 @@ class Domain < ActiveRecord::Base
def set_validity_dates
self.registered_at = Time.zone.now
self.valid_from = Date.today
self.valid_from = Time.zone.now.to_date
self.valid_to = valid_from + self.class.convert_period_to_time(period, period_unit)
end