アメリカ/デンバーのタイムゾーンの解析を突然終了するicalフィードを解析していますが、他のタイムゾーンは機能します。私はztinfogemと最新のricalgemを使用しています。これが失敗を示すサンプルです。
require 'tzinfo'
require 'ri_cal'
az = <<AZ
BEGIN:VCALENDAR
PRODID:-//SuperSaaS//Super Schedule//EN
METHOD:PUBLISH
VERSION:2.0
CALSCALE:GREGORIAN
X-WR-CALNAME:Fluid Meeting Space
X-WR-TIMEZONE:America/Phoenix
X-WR-RELCALID:40409
BEGIN:VTIMEZONE
TZID:America/Phoenix
BEGIN:STANDARD
TZOFFSETFROM:-0600
TZOFFSETTO:-0700
DTSTART:19671029T010000
RDATE:19671029T010000
TZNAME:MST
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:1641738@supersaas.com
DTSTAMP:20110519T195014Z
DTSTART;TZID=America/Phoenix:20110428T120000
DTEND;TZID=America/Phoenix:20110428T130000
SUMMARY:Dusty
DESCRIPTION:Test Meeting
CREATED:20110428T210637Z
LAST-MODIFIED:20110428T210637Z
URL:http://www.supersaas.com/schedule/red27/Fluid_Meeting_Space?year=2011&m
onth=4&day=28
END:VEVENT
END:VCALENDAR
AZ
mst = <<MST
BEGIN:VCALENDAR
PRODID:-//SuperSaaS//Super Schedule//EN
METHOD:PUBLISH
VERSION:2.0
CALSCALE:GREGORIAN
X-WR-CALNAME:Fluid Meeting Space
X-WR-TIMEZONE:America/Denver
X-WR-RELCALID:40409
BEGIN:VTIMEZONE
TZID:America/Denver
BEGIN:DAYLIGHT
TZOFFSETFROM:-0700
TZOFFSETTO:-0600
DTSTART:20110313T030000
RDATE:20110313T030000
TZNAME:MDT
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:1641738@supersaas.com
DTSTAMP:20110519T192544Z
DTSTART;TZID=America/Denver:20110428T120000
DTEND;TZID=America/Denver:20110428T130000
SUMMARY:Dusty
DESCRIPTION:Test Meeting
CREATED:20110428T210637Z
LAST-MODIFIED:20110428T210637Z
URL:http://www.supersaas.com/schedule/red27/Fluid_Meeting_Space?year=2011&m
onth=4&day=28
END:VEVENT
END:VCALENDAR
MST
def show(vcal)
components = RiCal.parse_string(vcal.strip)
components.each do |cal|
puts cal.events.count
cal.events.each do |e|
puts "UID: #{e.inspect}"
puts "Start: #{e.dtstart} "
puts "End: #{e.dtend} "
puts "******************************"
end
end
end
show(az)
show(mst)