{"id":2255,"date":"2019-09-10T16:40:01","date_gmt":"2019-09-10T12:40:01","guid":{"rendered":"http:\/\/sandalov.org\/blog\/?p=2255"},"modified":"2019-09-10T16:40:03","modified_gmt":"2019-09-10T12:40:03","slug":"fix-ios-macos-calendar-incorrect-time-zone-info","status":"publish","type":"post","link":"https:\/\/sandalov.org\/blog\/2255\/","title":{"rendered":"Fix iOS\/MacOS Calendar incorrect time zone info"},"content":{"rendered":"<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>Modifies iCalendar (rfc5545) TZOFFSETFROM and TZOFFSETTO from +023017 to +0300.<br \/>\nExample:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nBEGIN:VTIMEZONE\nTZID:Europe\/Moscow\nBEGIN:STANDARD\nTZOFFSETFROM:+023017\nDTSTART:20010101T000000\nTZNAME:GMT+3\nTZOFFSETTO:+023017\nEND:STANDARD\nEND:VTIMEZONE\n<\/pre>\n<p>Script:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ngrep -rl '+023017' ~\/.mycalendars | xargs -I {} sed -i -r 's\/\\+023017\/+0300\/; s\/(SEQUENCE:)(&#x5B;0-9]+)\/echo \\1&quot;$((\\2+1))&quot;\/e; s\/LAST-MODIFIED:.*\/echo &quot;LAST-MODIFIED:$(date +%Y%m%dT%H%M%SZ)&quot;\/e' {}\n<\/pre>\n<p>Related:<\/p>\n<ul>\n<li><a href=\"https:\/\/tools.ietf.org\/html\/rfc5545\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/tools.ietf.org\/html\/rfc5545<\/a><\/li>\n<li><a href=\"https:\/\/discussions.apple.com\/thread\/7994873\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/discussions.apple.com\/thread\/7994873<\/a><\/li>\n<li><a href=\"https:\/\/discussions.apple.com\/thread\/8309546\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/discussions.apple.com\/thread\/8309546<\/a><\/li>\n<li><a href=\"http:\/\/kerio-rus.ru\/forum\/showthread.php?p=148888\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/kerio-rus.ru\/forum\/showthread.php?p=148888<\/a><\/li>\n<\/ul>\n<div class=\"2d836d85a73757df15d0de19d7bef594\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-2287684400845931\";\r\n\/* valerymorozov *\/\r\ngoogle_ad_slot = \"5606708872\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Modifies iCalendar (rfc5545) TZOFFSETFROM and TZOFFSETTO from +023017 to +0300. Example: BEGIN:VTIMEZONE TZID:Europe\/Moscow BEGIN:STANDARD TZOFFSETFROM:+023017 DTSTART:20010101T000000 TZNAME:GMT+3 TZOFFSETTO:+023017 END:STANDARD END:VTIMEZONE Script: grep -rl &#8216;+023017&#8217; ~\/.mycalendars | xargs -I {} sed -i -r &#8216;s\/\\+023017\/+0300\/; s\/(SEQUENCE:)(&#x5B;0-9]+)\/echo \\1&quot;$((\\2+1))&quot;\/e; s\/LAST-MODIFIED:.*\/echo &quot;LAST-MODIFIED:$(date +%Y%m%dT%H%M%SZ)&quot;\/e&#8217; {} Related: https:\/\/tools.ietf.org\/html\/rfc5545 https:\/\/discussions.apple.com\/thread\/7994873 https:\/\/discussions.apple.com\/thread\/8309546 http:\/\/kerio-rus.ru\/forum\/showthread.php?p=148888<\/p>\n","protected":false},"author":1,"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_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[388,386,387,203],"class_list":["post-2255","post","type-post","status-publish","format-standard","hentry","category-unsorted","tag-icalendar","tag-ios","tag-macos","tag-script"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/2255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/comments?post=2255"}],"version-history":[{"count":14,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/2255\/revisions"}],"predecessor-version":[{"id":2273,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/posts\/2255\/revisions\/2273"}],"wp:attachment":[{"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/media?parent=2255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/categories?post=2255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sandalov.org\/blog\/wp-json\/wp\/v2\/tags?post=2255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}