{"id":968,"date":"2009-03-29T04:10:59","date_gmt":"2009-03-29T08:10:59","guid":{"rendered":"http:\/\/judykat.com\/ken\/?p=968"},"modified":"2009-03-29T04:10:59","modified_gmt":"2009-03-29T08:10:59","slug":"outlook-office-online-insert-icalendar-hack-here-google-calendar-google-sync-blackberry","status":"publish","type":"post","link":"https:\/\/judykat.com\/ken-judy\/outlook-office-online-insert-icalendar-hack-here-google-calendar-google-sync-blackberry\/","title":{"rendered":"Outlook -> Office Online -> [insert icalendar hack here] -> Google Calendar -> Google Sync -> Blackberry"},"content":{"rendered":"<p>I have reason to want an exchange calendar sync&#8217;d to my blackberry. Problem being, the blackberry is not on that exchange server&#8217;s enterprise services and blackberry internet service doesn&#8217;t sync calendars.<\/p>\n<p>Happily, <a href=\"http:\/\/blogs.msdn.com\/outlook\/archive\/2007\/08\/08\/publishing-a-calendar-using-office-online.aspx\">Office Online offers the ability to publish calenders<\/a> in an icalendar format. With <a href=\"http:\/\/www.google.com\/mobile\/blackberry\/sync.html\">Google Sync for Blackberry<\/a> and Google Calendar I could subscribe and sync to my blackberry.<\/p>\n<p>At some point, this broke.<\/p>\n<p>Unhappily, it appears the Office Online feed has started failing in Google&#8217;s icalendar parser. It also fails in the <a href=\"http:\/\/severinghaus.org\/projects\/icv\/\">iCalendar Validator by Steven N. Severinghaus.<\/a><\/p>\n<p>Google has just released an <a href=\"http:\/\/www.google.com\/support\/calendar\/bin\/answer.py?hl=en&#038;answer=89955\">Outlook add-in to sync calendars<\/a> but I have restricted permissions to install software on my Outlook pc. So, I decided to try to solve this on my own.<\/p>\n<p>Using http rather than webcal iCalendar Validator was able to flag the following:<\/p>\n<p><code>Error:  \tError was: Error at line 68: Unparseable date: \"2\"<\/code><\/p>\n<p>Looking in the feed, I found word wrapping breaking dates and guids:<\/p>\n<p><code>EXDATE;TZID=\"GMT -0500 (Standard) \/ GMT -0400 (Daylight)\":20090316T140000,2<br \/>\n0090323T140000<\/code><\/p>\n<p>After finding other services that could parse the feed but none that would sync over the wire to my blackberry calendar, I wrote a short php script to make the feed comply with Google&#8217;s parser.<\/p>\n<p><code>&lt;?php<br \/>\n\/\/request the icalendar file<br \/>\n$output = file_get_contents('http:\/\/[path to calendar ics file]');<br \/>\n\/\/clean up the icalendar content<br \/>\n$output = preg_replace(\"\/[\\n|\\r]+\\t\/m\", \"\", $output);<br \/>\n\/\/print out the result<br \/>\necho $output;<br \/>\n?&gt;<\/code><\/p>\n<p>Now I can subscribe to the calendar via my script&#8217;s URL and google reads and syncs it to my blackberry. Happiness for now &#8211; at least until this kludge train derails again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have reason to want an exchange calendar sync&#8217;d to my blackberry. Problem being, the blackberry is not on that exchange server&#8217;s enterprise services and blackberry internet service doesn&#8217;t sync calendars. Happily, Office Online offers the ability to publish calenders &hellip; <a href=\"https:\/\/judykat.com\/ken-judy\/outlook-office-online-insert-icalendar-hack-here-google-calendar-google-sync-blackberry\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[30],"tags":[616,78,617,77,615,76,101,618],"class_list":["post-968","post","type-post","status-publish","format-standard","hentry","category-software-development","tag-blackberry-internet-service","tag-google","tag-http","tag-icalendar","tag-online-feed","tag-outlook","tag-php","tag-steven-n-severinghaus"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/posts\/968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/comments?post=968"}],"version-history":[{"count":18,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/posts\/968\/revisions"}],"predecessor-version":[{"id":986,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/posts\/968\/revisions\/986"}],"wp:attachment":[{"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/media?parent=968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/categories?post=968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/tags?post=968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}