From 0cd03772f7d838b20e161ae1a7664ab76448a8b3 Mon Sep 17 00:00:00 2001 From: 0ry5 <oscar.bloch@posteo.de> Date: Fri, 11 Apr 2025 19:52:25 +0200 Subject: [PATCH] fix(events_to_ics): fix VTIMEZONE --- _plugins/events_to_ics.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/_plugins/events_to_ics.rb b/_plugins/events_to_ics.rb index b32d88a..954719e 100644 --- a/_plugins/events_to_ics.rb +++ b/_plugins/events_to_ics.rb @@ -14,8 +14,23 @@ module Jekyll default_duration = Rational(4, 24) cal = Icalendar::Calendar.new + # Define Europe/Berlin timezone with standard rules (incl. DST) cal.timezone do |t| t.tzid = "Europe/Berlin" + # Daylight Saving Time (DST) adjustments (if applicable) + t.daylight do |d| + d.tzoffsetfrom = "-0100" + d.tzoffsetto = "-0200" + d.dtstart = "19700329T020000" + d.tzname = "CEST" + end + # Standard Time definition + t.standard do |s| + s.tzoffsetfrom = "-0200" + s.tzoffsetto = "-0100" + s.dtstart = "19701025T030000" + s.tzname = "CET" + end end events.each do |event|