diff --git a/app/jobs/finalize_account_invoices.rb b/app/jobs/finalize_account_invoices.rb index 4baa841db6..25b614bebc 100644 --- a/app/jobs/finalize_account_invoices.rb +++ b/app/jobs/finalize_account_invoices.rb @@ -51,7 +51,7 @@ class FinalizeAccountInvoices job: "FinalizeAccountInvoices", error: "end_date is in the future", data: { - end_date: end_date.localtime.strftime("%F %T"), + end_date: end_date.in_time_zone.strftime("%F %T"), now: Time.zone.now.strftime("%F %T") } }) diff --git a/app/jobs/update_account_invoices.rb b/app/jobs/update_account_invoices.rb index 9a08c77383..16112ef870 100644 --- a/app/jobs/update_account_invoices.rb +++ b/app/jobs/update_account_invoices.rb @@ -85,7 +85,7 @@ class UpdateAccountInvoices job: "UpdateAccountInvoices", error: "end_date is in the future", data: { - end_date: end_date.localtime.strftime("%F %T"), + end_date: end_date.in_time_zone.strftime("%F %T"), now: Time.zone.now.strftime("%F %T") } }) diff --git a/app/jobs/update_billable_periods.rb b/app/jobs/update_billable_periods.rb index d775b093f3..80f19d961a 100644 --- a/app/jobs/update_billable_periods.rb +++ b/app/jobs/update_billable_periods.rb @@ -118,7 +118,7 @@ class UpdateBillablePeriods job: "UpdateBillablePeriods", error: "end_date is in the future", data: { - end_date: end_date.localtime.strftime("%F %T"), + end_date: end_date.in_time_zone.strftime("%F %T"), now: Time.zone.now.strftime("%F %T") } }) diff --git a/app/models/billable_period.rb b/app/models/billable_period.rb index d66c51aa48..d604b5a59c 100644 --- a/app/models/billable_period.rb +++ b/app/models/billable_period.rb @@ -31,8 +31,8 @@ class BillablePeriod < ActiveRecord::Base end def adjustment_label - begins = begins_at.localtime.strftime("%d/%m/%y") - ends = ends_at.localtime.strftime("%d/%m/%y") + begins = begins_at.in_time_zone.strftime("%d/%m/%y") + ends = ends_at.in_time_zone.strftime("%d/%m/%y") "#{label} [#{begins} - #{ends}]" end diff --git a/app/views/admin/account/show.html.haml b/app/views/admin/account/show.html.haml index 00ba61cd1d..808402ed16 100644 --- a/app/views/admin/account/show.html.haml +++ b/app/views/admin/account/show.html.haml @@ -64,8 +64,8 @@ -# %th Bill -# - enterprise.billable_periods.each do |billable_period| -# %tr --# %td= billable_period.begins_at.localtime.strftime("%F %T") --# %td= billable_period.ends_at.localtime.strftime("%F %T") +-# %td= billable_period.begins_at.in_time_zone.strftime("%F %T") +-# %td= billable_period.ends_at.in_time_zone.strftime("%F %T") -# %td= billable_period.sells -# %td= billable_period.trial? -# %td= billable_period.display_turnover