mobilizon.chapril.org-mobil.../lib/web/templates/email/date/event_tz_date.text.eex
Thomas Citharel bd4fad3c58
Improve emails
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-10-18 11:13:37 +02:00

2 lines
797 B
Elixir

<%= if @event.options.timezone == nil do %><%= @date |> datetime_tz_convert(@timezone) |> datetime_to_string(@locale) %><% else %><%= if @event.options.timezone != @timezone do %><%= gettext "%{date_time} (%{timezone} %{offset})", date_time: @date |> datetime_tz_convert(@event.options.timezone) |> datetime_to_string(@locale), timezone: @event.options.timezone, offset: @date |> datetime_tz_convert(@event.options.timezone) |> Cldr.DateTime.Formatter.zone_gmt() %><% else %><%= gettext "%{date_time} (in your timezone %{timezone} %{offset})", date_time: @date |> datetime_tz_convert(@event.options.timezone) |> datetime_to_string(@locale), timezone: @event.options.timezone, offset: @date |> datetime_tz_convert(@event.options.timezone) |> Cldr.DateTime.Formatter.zone_gmt() %><% end %><% end %>