Create stammtisch data using correct timezone infos
This commit is contained in:
parent
3120126cad
commit
086991118f
4 changed files with 22 additions and 11 deletions
2
Gemfile
2
Gemfile
|
|
@ -12,4 +12,6 @@ gem 't'
|
|||
gem 'nokogiri'
|
||||
gem 'feedzirra'
|
||||
gem 'ri_cal'
|
||||
gem 'tzinfo'
|
||||
gem 'tzinfo-data'
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue