From 3a535e711288e36aeb669dc9dc8eb064386fd712 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 8 Oct 2026 16:06:41 +0300 Subject: [PATCH] adjust date timezone --- app/views/start_form/completed.html.erb | 2 +- app/views/submissions_preview/completed.html.erb | 2 +- app/views/submit_form/completed.html.erb | 2 +- app/views/submit_form/declined.html.erb | 2 +- app/views/submit_form/delegated.html.erb | 2 +- app/views/submit_form/email_2fa.html.erb | 2 +- app/views/submit_form/expired.html.erb | 2 +- config/locales/i18n.yml | 10 +++++----- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/views/start_form/completed.html.erb b/app/views/start_form/completed.html.erb index 8711797e7..bb576a831 100644 --- a/app/views/start_form/completed.html.erb +++ b/app/views/start_form/completed.html.erb @@ -12,7 +12,7 @@

<%= @submitter.submission.template&.name %>

- <%= t(@submitter.with_signature_fields? ? 'signed_on_time' : 'completed_on_time', time: l(@submitter.completed_at.to_date, format: :long)) %> + <%= t(@submitter.with_signature_fields? ? 'signed_on_time' : 'completed_on_time', time: l(@submitter.completed_at.in_time_zone(@submitter.account.timezone).to_date, format: :long)) %>

diff --git a/app/views/submissions_preview/completed.html.erb b/app/views/submissions_preview/completed.html.erb index f844b6188..a09e2c8bd 100644 --- a/app/views/submissions_preview/completed.html.erb +++ b/app/views/submissions_preview/completed.html.erb @@ -15,7 +15,7 @@ <% last_submitter = @submission.submitters.completed.order(:completed_at).last %> <% if last_submitter %>

- <%= t(last_submitter.with_signature_fields? ? 'signed_on_time' : 'completed_on_time', time: l(last_submitter.completed_at.to_date, format: :long)) %> + <%= t(last_submitter.with_signature_fields? ? 'signed_on_time' : 'completed_on_time', time: l(last_submitter.completed_at.in_time_zone(@submission.account.timezone).to_date, format: :long)) %>

<% end %> diff --git a/app/views/submit_form/completed.html.erb b/app/views/submit_form/completed.html.erb index 217c97c8a..7c7693814 100644 --- a/app/views/submit_form/completed.html.erb +++ b/app/views/submit_form/completed.html.erb @@ -13,7 +13,7 @@

<%= @submitter.submission.name || @submitter.submission.template&.name %>

- <%= t(@submitter.with_signature_fields? ? 'signed_on_time' : 'completed_on_time', time: l(completed_at.to_date, format: :long)) %> + <%= t(@submitter.with_signature_fields? ? 'signed_on_time' : 'completed_on_time', time: l(completed_at.in_time_zone(@submitter.account.timezone).to_date, format: :long)) %>

diff --git a/app/views/submit_form/declined.html.erb b/app/views/submit_form/declined.html.erb index 1c896dc0b..f938ede23 100644 --- a/app/views/submit_form/declined.html.erb +++ b/app/views/submit_form/declined.html.erb @@ -11,7 +11,7 @@

<%= @submitter.submission.name || @submitter.submission.template&.name %>

-

<%= t('form_has_been_declined_on_html', time: l(@submitter.declined_at, format: :long)) %>

+

<%= t('form_has_been_declined_on_html', time: l(@submitter.declined_at.in_time_zone(@submitter.account.timezone).to_date, format: :long)) %>

diff --git a/app/views/submit_form/delegated.html.erb b/app/views/submit_form/delegated.html.erb index 18a225615..ccf6e3ba6 100644 --- a/app/views/submit_form/delegated.html.erb +++ b/app/views/submit_form/delegated.html.erb @@ -11,7 +11,7 @@

<%= @submitter.submission.name || @submitter.submission.template&.name %>

-

<%= t('document_has_been_delegated_on_html', time: l(@submitter.submission_events.order(event_timestamp: :desc).find_by!(event_type: :delegate_form).event_timestamp, format: :long)) %>

+

<%= t('document_has_been_delegated_on_html', time: l(@submitter.submission_events.order(event_timestamp: :desc).find_by!(event_type: :delegate_form).event_timestamp.in_time_zone(@submitter.account.timezone).to_date, format: :long)) %>

diff --git a/app/views/submit_form/email_2fa.html.erb b/app/views/submit_form/email_2fa.html.erb index b79479d2e..6bb4a584b 100644 --- a/app/views/submit_form/email_2fa.html.erb +++ b/app/views/submit_form/email_2fa.html.erb @@ -19,7 +19,7 @@ <% last_submitter = @submitter.submission.submitters.completed.order(:completed_at).last %> <% if last_submitter %>

- <%= t(last_submitter.with_signature_fields? ? 'signed_on_time' : 'completed_on_time', time: l(last_submitter.completed_at.to_date, format: :long)) %> + <%= t(last_submitter.with_signature_fields? ? 'signed_on_time' : 'completed_on_time', time: l(last_submitter.completed_at.in_time_zone(@submitter.account.timezone).to_date, format: :long)) %>

<% end %> diff --git a/app/views/submit_form/expired.html.erb b/app/views/submit_form/expired.html.erb index 1631f7aee..671583377 100644 --- a/app/views/submit_form/expired.html.erb +++ b/app/views/submit_form/expired.html.erb @@ -11,7 +11,7 @@

<%= @submitter.submission.name || @submitter.submission.template&.name %>

-

<%= t('form_expired_at_html', time: l(@submitter.submission.expire_at, format: :long)) %>

+

<%= t('form_expired_at_html', time: l(@submitter.submission.expire_at.in_time_zone(@submitter.account.timezone).to_date, format: :long)) %>

diff --git a/config/locales/i18n.yml b/config/locales/i18n.yml index 0b87d4745..b432b436a 100644 --- a/config/locales/i18n.yml +++ b/config/locales/i18n.yml @@ -6987,14 +6987,14 @@ pl: decline_reason: Powód odrzucenia provide_a_reason: Podaj powód notify_the_sender_with_the_reason_you_declined: Powiadom nadawcę o powodzie, dla którego odrzuciłeś - form_has_been_declined_on_html: 'Formularz został odrzucony o %{time}' - document_has_been_delegated_on_html: 'Dokument został oddelegowany o %{time}' + form_has_been_declined_on_html: 'Formularz został odrzucony %{time}' + document_has_been_delegated_on_html: 'Dokument został oddelegowany %{time}' name_declined_by_submitter: '"%{name}" odrzucono przez %{submitter}' name_declined_by_submitter_with_the_following_reason: '"%{name}" został odrzucony przez %{submitter} z następującym powodem:' email: E-mail verification_code_code: 'Kod weryfikacyjny: %{code}' digitally_signed_by: Podpis cyfrowy przez - form_expired_at_html: 'Formularz wygasł o %{time}' + form_expired_at_html: 'Formularz wygasł %{time}' role: Rola provide_your_email_to_start: Podaj swój e-mail, aby rozpocząć provide_your_email: Podaj swój e-mail @@ -7129,8 +7129,8 @@ uk: decline_reason: Причина відхилення provide_a_reason: Надайте причину notify_the_sender_with_the_reason_you_declined: Повідомте відправника про причину свого відхилення - form_has_been_declined_on_html: 'Форму було відхилено о %{time}' - document_has_been_delegated_on_html: 'Документ було делеговано о %{time}' + form_has_been_declined_on_html: 'Форму було відхилено %{time}' + document_has_been_delegated_on_html: 'Документ було делеговано %{time}' name_declined_by_submitter: '"%{name}" відхилено %{submitter}' name_declined_by_submitter_with_the_following_reason: '"%{name}" було відхилено %{submitter} з такою причиною:' email: E-mail