Time.now => Time.zone.now
This commit is contained in:
parent
13ffa61435
commit
2238e5bd9f
21 changed files with 55 additions and 55 deletions
|
@ -10,7 +10,7 @@ module Cellar
|
|||
end
|
||||
|
||||
def sign(request, key)
|
||||
date = Time.now.httpdate
|
||||
date = Time.zone.now.httpdate
|
||||
sig = signature(
|
||||
method: request.method,
|
||||
key: key,
|
||||
|
|
|
@ -16,12 +16,12 @@ namespace :'2018_09_12_fix_templates' do
|
|||
|
||||
dossiers_with_invalid_template_ids = Dossier
|
||||
.where(procedure_id: invalid_procedures_ids)
|
||||
.where(processed_at: DEPLOY_DATETIME..Time.now)
|
||||
.where(processed_at: DEPLOY_DATETIME..Time.zone.now)
|
||||
.pluck(:id)
|
||||
|
||||
Attestation
|
||||
.includes(:dossier)
|
||||
.where(created_at: DEPLOY_DATETIME..Time.now)
|
||||
.where(created_at: DEPLOY_DATETIME..Time.zone.now)
|
||||
.where(dossier_id: dossiers_with_invalid_template_ids)
|
||||
.map(&:dossier)
|
||||
end
|
||||
|
|
|
@ -105,7 +105,7 @@ namespace :cloudstorage do
|
|||
|
||||
@cont.objects_detail.each { |object, details|
|
||||
last_modified = DateTime.parse(details[:last_modified])
|
||||
@cont.delete_object(object) if last_modified.utc <= (Time.now - 2.years).utc
|
||||
@cont.delete_object(object) if last_modified.utc <= (Time.zone.now - 2.years).utc
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue