mobilizon/lib/web/templates/email/date/event_tz_date.text.eex

2 lines
797 B
Elixir
Raw Normal View History

<%= 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 %>