The ics timezone now should be using the server setting.

Hopefully, this should be the good one in quebec or brasil!

(testing and feedback would be great)

Closes #76
This commit is contained in:
echarp 2018-03-17 17:21:26 +01:00
parent db2fd4eb96
commit eb46eb92ef
2 changed files with 8 additions and 8 deletions

View File

@ -3,10 +3,11 @@ VERSION:2.0
PRODID:-//AgendaDuLibre.org
X-WR-CALNAME:<%= t('title', scope: [:layouts, :application]).gsub(/'/, '') %>
X-WR-CALDESC:<%= t 'subtitle', scope: [:layouts, :application] %>
X-WR-TIMEZONE:<%= Time.now.zone %>
<% @events.find_each do |event| %>
BEGIN:VEVENT
DTSTART:<%= event.start_time.strftime '%Y%m%dT%H%M%S' %>
DTEND:<%= event.end_time.strftime '%Y%m%dT%H%M%S' %>
DTSTART;TZID=<%= Time.now.zone %>:<%= event.start_time.strftime '%Y%m%dT%H%M%S' %>
DTEND;TZID=<%= Time.now.zone %>:<%= event.end_time.strftime '%Y%m%dT%H%M%S' %>
UID:<%= event.id %>@agendadulibre.org
SUMMARY:<%= event.title.gsub(',', '\,').gsub(';', '\;') %>
URL:<%= event_url event %>

View File

@ -1,14 +1,13 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//AgendaDuLibre.org
X-WR-CALNAME:Agenda du Libre
X-WR-TIMEZONE:Europe/Paris
CALSCALE:GREGORIAN
X-WR-CALDESC:<%= t 'title', scope: [:layouts, :application] %>
X-WR-CALNAME:<%= t('title', scope: [:layouts, :application]).gsub(/'/, '') %>
X-WR-CALDESC:<%= t 'subtitle', scope: [:layouts, :application] %>
X-WR-TIMEZONE:<%= Time.now.zone %>
<% event = @event %>
BEGIN:VEVENT
DTSTART;TZID=Europe/Paris:<%= event.start_time.strftime '%Y%m%dT%H%M%S' %>
DTEND;TZID=Europe/Paris:<%= event.end_time.strftime '%Y%m%dT%H%M%S' %>
DTSTART;TZID=<%= Time.now.zone %>:<%= event.start_time.strftime '%Y%m%dT%H%M%S' %>
DTEND;TZID=<%= Time.now.zone %>:<%= event.end_time.strftime '%Y%m%dT%H%M%S' %>
UID:<%= event.id %>@agendadulibre.org
SUMMARY:<%= event.title %>
URL:<%= event_url event %>