From 6681fadd4af8c48dcd56fdcd5dc2d6206fa1c152 Mon Sep 17 00:00:00 2001 From: Tomasz Donarski Date: Tue, 9 Jan 2024 08:57:49 +0100 Subject: [PATCH 1/2] Remove unnecessary conversion to string --- app/views/spree/admin/promotions/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/promotions/index.html.erb b/app/views/spree/admin/promotions/index.html.erb index 22efc38109..d5fb889394 100644 --- a/app/views/spree/admin/promotions/index.html.erb +++ b/app/views/spree/admin/promotions/index.html.erb @@ -64,7 +64,7 @@ <%= promotion.description %> <%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %> <%= Spree.t(:current_promotion_usage, count: promotion.credits_count) %> - <%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %> + <%= promotion.expires_at.to_date if promotion.expires_at %> <%= link_to_edit promotion, no_text: true if can?(:edit, promotion) %> From ab5b4d5b0d614a9987cc44a2e3c49e914e752514 Mon Sep 17 00:00:00 2001 From: Tomasz Donarski Date: Tue, 9 Jan 2024 12:37:16 +0100 Subject: [PATCH 2/2] Convet time with strftime --- app/views/spree/admin/promotions/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/promotions/index.html.erb b/app/views/spree/admin/promotions/index.html.erb index d5fb889394..35062e04bd 100644 --- a/app/views/spree/admin/promotions/index.html.erb +++ b/app/views/spree/admin/promotions/index.html.erb @@ -64,7 +64,7 @@ <%= promotion.description %> <%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %> <%= Spree.t(:current_promotion_usage, count: promotion.credits_count) %> - <%= promotion.expires_at.to_date if promotion.expires_at %> + <%= promotion.expires_at.strftime('%F %T %Z') if promotion.expires_at %> <%= link_to_edit promotion, no_text: true if can?(:edit, promotion) %>