Show correct timezone in event-related emails
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -74,7 +74,21 @@
|
||||
<%= gettext "Start" %>
|
||||
</td>
|
||||
<td bgcolor="#ffffff" align="left">
|
||||
<b><%= @event.begins_on |> datetime_tz_convert(@timezone) |> datetime_to_string(@locale) %></b>
|
||||
<%= if @event.options.timezone == nil do %>
|
||||
<b><%= @event.begins_on |> datetime_tz_convert(@timezone) |> datetime_to_string(@locale) %></b>
|
||||
<% else %>
|
||||
<span style="font-size: 14px;">
|
||||
<%= if @event.options.timezone != @timezone do %>
|
||||
<%# Event with different timezone than user %>
|
||||
<b><%= @event.begins_on |> datetime_tz_convert(@event.options.timezone) |> datetime_to_string(@locale) %></b><br />
|
||||
<%= gettext "🌐 %{timezone} %{offset}", timezone: @event.options.timezone, offset: @event.begins_on |> datetime_tz_convert(@event.options.timezone) |> Cldr.DateTime.Formatter.zone_gmt() %>
|
||||
<% else %>
|
||||
<%# Event with same timezone than user %>
|
||||
<b><%= @event.begins_on |> datetime_tz_convert(@event.options.timezone) |> datetime_to_string(@locale) %></b><br />
|
||||
<%= gettext "In your timezone (%{timezone} %{offset})", timezone: @event.options.timezone, offset: @event.begins_on |> datetime_tz_convert(@event.options.timezone) |> Cldr.DateTime.Formatter.zone_gmt() %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user