mirror of
https://github.com/internetee/registry.git
synced 2025-05-20 19:29:39 +02:00
Converted to use Rails Time.zone only to honor app time zone
This commit is contained in:
parent
a42136268f
commit
e1041da50f
16 changed files with 34 additions and 31 deletions
|
@ -12,7 +12,7 @@ class ZonefileSetting < ActiveRecord::Base
|
|||
def self.generate_zonefile(origin)
|
||||
filename = "#{origin}.zone"
|
||||
|
||||
STDOUT << "#{Time.now.utc} - Generating zonefile #{filename}\n"
|
||||
STDOUT << "#{Time.zone.now.utc} - Generating zonefile #{filename}\n"
|
||||
|
||||
zf = ActiveRecord::Base.connection.execute(
|
||||
"select generate_zonefile('#{origin}')"
|
||||
|
@ -20,7 +20,7 @@ class ZonefileSetting < ActiveRecord::Base
|
|||
|
||||
File.open("#{ENV['zonefile_export_dir']}/#{filename}", 'w') { |f| f.write(zf) }
|
||||
|
||||
STDOUT << "#{Time.now.utc} - Successfully generated zonefile #{filename}\n"
|
||||
STDOUT << "#{Time.zone.now.utc} - Successfully generated zonefile #{filename}\n"
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue