Create stammtisch data using correct timezone infos

This commit is contained in:
Stefan Schlott 2013-08-28 12:15:50 +02:00
parent 3120126cad
commit 086991118f
4 changed files with 22 additions and 11 deletions

View file

@ -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',