DateTime.new => Time.zone.local
This commit is contained in:
parent
4b25d16f5a
commit
e684cec516
9 changed files with 41 additions and 41 deletions
|
@ -8,8 +8,8 @@ namespace :'2018_03_08_send_missing_accuse_reception' do
|
|||
# `bug_date` and `fix_date` were determined empirically by looking at the release times,
|
||||
# and checking for dossiers with a missing accusé de réception.
|
||||
|
||||
bug_date = DateTime.new(2018, 3, 1, 9, 50)
|
||||
fix_date = DateTime.new(2018, 3, 5, 18, 40)
|
||||
bug_date = Time.zone.local(2018, 3, 1, 9, 50)
|
||||
fix_date = Time.zone.local(2018, 3, 5, 18, 40)
|
||||
|
||||
# Only send the accusé for dossiers that are still en construction.
|
||||
# For dossiers that have moved on, other mails have been sent since, and a late
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace :'2018_05_30_missed_ar_messages' do
|
|||
end
|
||||
|
||||
def create_commentaires(date_name, template_name, dossiers = Dossier)
|
||||
error_range = DateTime.new(2018, 05, 28, 13, 33)..DateTime.new(2018, 05, 30, 15, 39)
|
||||
error_range = Time.zone.local(2018, 05, 28, 13, 33)..Time.zone.local(2018, 05, 30, 15, 39)
|
||||
|
||||
dossiers.includes(:procedure).where(date_name => error_range).find_each(batch_size: 100) do |dossier|
|
||||
print "#{dossier.id}\n"
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace :'2018_09_12_fix_templates' do
|
|||
end
|
||||
|
||||
# 16:15 in Paris -> 14:15 UTC
|
||||
DEPLOY_DATETIME = DateTime.new(2018, 9, 5, 14, 15, 0)
|
||||
DEPLOY_DATETIME = Time.zone.local(2018, 9, 5, 14, 15, 0)
|
||||
|
||||
def find_dossiers_with_sent_and_invalid_attestations
|
||||
invalid_procedures_ids = AttestationTemplate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue