diff --git a/Gemfile b/Gemfile index a959447a..6a26b71f 100644 --- a/Gemfile +++ b/Gemfile @@ -12,4 +12,6 @@ gem 't' gem 'nokogiri' gem 'feedzirra' gem 'ri_cal' +gem 'tzinfo' +gem 'tzinfo-data' diff --git a/Gemfile.lock b/Gemfile.lock index 0ecd68d1..08038289 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -123,6 +123,9 @@ GEM faraday (~> 0.8, < 0.10) multi_json (~> 1.0) simple_oauth (~> 0.2) + tzinfo (1.0.1) + tzinfo-data (1.2013.4) + tzinfo (>= 1.0.0) yajl-ruby (1.1.0) PLATFORMS @@ -140,3 +143,5 @@ DEPENDENCIES sass systemu t + tzinfo + tzinfo-data diff --git a/content/_data/stammtisch.yaml b/content/_data/stammtisch.yaml index 8247e799..414e9cbb 100644 --- a/content/_data/stammtisch.yaml +++ b/content/_data/stammtisch.yaml @@ -1,26 +1,26 @@ --- events: -- startdate: 2013-01-01 18:00:00.000000000 +02:00 +- startdate: 2013-01-01 18:00:00.000000000 +01:00 duration: 4h location: location: zadu -- startdate: 2013-01-16 18:00:00.000000000 +02:00 +- startdate: 2013-01-16 18:00:00.000000000 +01:00 duration: 4h location: location: shack -- startdate: 2013-02-05 18:00:00.000000000 +02:00 +- startdate: 2013-02-05 18:00:00.000000000 +01:00 duration: 4h location: location: zadu -- startdate: 2013-02-20 18:00:00.000000000 +02:00 +- startdate: 2013-02-20 18:00:00.000000000 +01:00 duration: 4h location: location: shack -- startdate: 2013-03-05 18:00:00.000000000 +02:00 +- startdate: 2013-03-05 18:00:00.000000000 +01:00 duration: 4h location: location: zadu -- startdate: 2013-03-20 18:00:00.000000000 +02:00 +- startdate: 2013-03-20 18:00:00.000000000 +01:00 duration: 4h location: location: shack @@ -80,19 +80,19 @@ events: duration: 4h location: location: shack -- startdate: 2013-11-05 18:00:00.000000000 +02:00 +- startdate: 2013-11-05 18:00:00.000000000 +01:00 duration: 4h location: location: zadu -- startdate: 2013-11-20 18:00:00.000000000 +02:00 +- startdate: 2013-11-20 18:00:00.000000000 +01:00 duration: 4h location: location: shack -- startdate: 2013-12-03 18:00:00.000000000 +02:00 +- startdate: 2013-12-03 18:00:00.000000000 +01:00 duration: 4h location: location: zadu -- startdate: 2013-12-18 18:00:00.000000000 +02:00 +- startdate: 2013-12-18 18:00:00.000000000 +01:00 duration: 4h location: location: shack diff --git a/scripts/generate-stammtisch.rb b/scripts/generate-stammtisch.rb index b76af2ce..b23593dd 100755 --- a/scripts/generate-stammtisch.rb +++ b/scripts/generate-stammtisch.rb @@ -2,11 +2,15 @@ # encoding: utf-8 require 'date' +require 'tzinfo' require 'yaml' def event(day, dayoffset, location) - startDate = Time.new(day.year, day.month, day.day + dayoffset, 18, 0, 0, "+02:00") + #startDate = Time.new(day.year, day.month, day.day + dayoffset, 18, 0, 0, "+02:00") + #tz = TZInfo::Timezone.get('Europe/Berlin') + #startDate = tz.local_to_utc(Time.local(day.year, day.month, day.day + dayoffset, 18, 0, 0)) + startDate = Time.local(day.year, day.month, day.day + dayoffset, 18, 0, 0) { 'startdate' => startDate, 'duration' => '4h',