diff --git a/lib/pinchflat_web/components/custom_components/text_components.ex b/lib/pinchflat_web/components/custom_components/text_components.ex index 69ac0509..cba51ee3 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""" """