From 1c2b867f3c43f5f8ab750c81995bdf2dd1c6d21b Mon Sep 17 00:00:00 2001 From: Kieran Eglin Date: Tue, 7 May 2024 16:48:37 -0700 Subject: [PATCH] Updated compile-time value to be runtime --- .../components/custom_components/text_components.ex | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pinchflat_web/components/custom_components/text_components.ex b/lib/pinchflat_web/components/custom_components/text_components.ex index 69ac050..cba51ee 100644 --- a/lib/pinchflat_web/components/custom_components/text_components.ex +++ b/lib/pinchflat_web/components/custom_components/text_components.ex @@ -84,9 +84,12 @@ defmodule PinchflatWeb.CustomComponents.TextComponents do """ attr :datetime, :any, required: true attr :format, :string, default: "%Y-%m-%d %H:%M:%S" - attr :timezone, :string, default: Application.compile_env(:pinchflat, :timezone) + attr :timezone, :string, default: nil def datetime_in_zone(assigns) do + timezone = assigns.timezone || Application.get_env(:pinchflat, :timezone) + assigns = Map.put(assigns, :timezone, timezone) + ~H""" """