Skip to content
Browse files

patch time zone detection, but just for Eastern as a certain string

  • Loading branch information...
1 parent 4711bbf commit a78da23c81628f1f6938c0418e8ce4bea9b87e39 @danchoi committed
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/icalendar/parser.rb
View
8 lib/icalendar/parser.rb
@@ -333,6 +333,14 @@ def parse_datetime(name, params, value)
else
timezone = params["TZID"].first if params["TZID"]
end
+
+ # DAN CHOI DIRTY PATCH
+ # Time zone is not being parsed correctly.
+ # Need a better solution later.
+ if timezone =~ /Eastern Standard Time/ && result.zone == '+00:00'
+ result = DateTime.parse(result.to_s.sub("+00:00", Time.now.zone))
+ end
+
result.icalendar_tzid = timezone
end
result

0 comments on commit a78da23

Please sign in to comment.
Something went wrong with that request. Please try again.