Revision a977bd3b
Added by Daniel Lobato Garcia over 8 years ago
app/services/report_importer.rb | ||
---|---|---|
end
|
||
|
||
def import
|
||
start_time = Time.now
|
||
start_time = Time.now.utc
|
||
logger.info "processing report for #{name}"
|
||
logger.debug { "Report: #{raw.inspect}" }
|
||
create_report_and_logs
|
||
if report.persisted?
|
||
logger.info("Imported report for #{name} in #{(Time.now - start_time).round(2)} seconds")
|
||
logger.info("Imported report for #{name} in #{(Time.now.utc - start_time).round(2)} seconds")
|
||
host.refresh_statuses
|
||
end
|
||
end
|
Also available in: Unified diff
Fixes #13557 - Rubocop enforce specifying a timezone
Rubocop can enforce what timezone to store in the database ,
so we can ensure everything is stored using UTC and we don't
miss these things in code reviews. When objects are displayed,
they must use the time provided by set_timezone in the
controller.
This is particularly relevant for Trends, Puppet graphs, etc... to
ensure they are stored always properly