Permalink
Browse files

Merge pull request #11 from michal6103/master

Time zone set up in ics export
  • Loading branch information...
2 parents 08f0f04 + 32de843 commit cac20d5847e1cb152ba58e1f84eadc7ef0b24e45 @joemsak joemsak committed Dec 12, 2011
Showing with 17 additions and 1 deletion.
  1. +17 −1 app/views/events/show.ics.erb
View
18 app/views/events/show.ics.erb
@@ -1,6 +1,21 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//iCalendar export//EN
+BEGIN:VTIMEZONE
+TZID:Europe/Central
+BEGIN:STANDARD
+DTSTART:19710101T030000
+TZOFFSETFROM:+0200
+TZOFFSETTO:+0100
+RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:19710101T020000
+TZOFFSETFROM:+0100
+TZOFFSETTO:+0200
+RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
+END:DAYLIGHT
+END:VTIMEZONE
BEGIN:VEVENT
UID:<%= @event.id %>@<%= request.host %>
SUMMARY:<%= @event.title %>
@@ -9,8 +24,9 @@ LOCATION:<%= @event.venue_address %>
URL:<%= custom_url_for @event %>
STATUS:CONFIRMED
CLASS:PUBLIC
+TZID=Europe/Central
DTSTART:<%= @event.start_at.strftime('%Y%m%dT%H%M%S') %>
DTEND:<%= @event.end_at.strftime('%Y%m%dT%H%M%S') %>
DTSTAMP:<%= @event.start_at.strftime('%Y%m%dT%H%M%S') %>
END:VEVENT
-END:VCALENDAR
+END:VCALENDAR

0 comments on commit cac20d5

Please sign in to comment.