Yeah, I think a simple method for specifying UTC or local would probably cover 99% of the need.<br><br>I have run into this because I am working with data coming out of Microsoft Exchange which as far as I can tell is always in UTC.
<br><br>Thanks,<br>greg<br><br><div><span class="gmail_quote">On 1/23/07, <b class="gmail_sendername">Jeff Rose</b> &lt;<a href="mailto:jeff@rosejn.net">jeff@rosejn.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Just went through the spec again to figure out how this works, and it&#39;s<br>a bit of a pain.&nbsp;&nbsp;There are two options for specifying time in an ical<br>file.&nbsp;&nbsp;If you use local time, then you just use the regular format and
<br>you do not include a &#39;Z&#39;.&nbsp;&nbsp;If you are specifying the time in UTC then<br>you include the &#39;Z&#39;.&nbsp;&nbsp;Just using UTC all the time makes the most sense,<br>to get around timezone confusions, but many people just use local time.
<br><br>There is another timezone format, where the UTC offset is added to the<br>end of the string, and this is what would result if you use the fix you<br>include.&nbsp;&nbsp;The specifically say this is not allowed in the spec though,
<br>so it probably worked for you because you are using UTC, but on my<br>machine here in Switzerland it is different:<br><br>Time.now.zone =&gt; &quot;CET&quot;<br>DateTime.now.zone =&gt; &quot;+0100&quot;<br><br>These would incorrectly add garbage to the end of the string...
<br><br>So yeah, I&#39;m not sure what the best solution is.&nbsp;&nbsp;By default right now<br>times are considered local, but maybe we should have a simple way to<br>specify that a given calendar or calendar component is using UTC time
<br>instead?<br><br>-Jeff<br><br>Greg Martin wrote:<br>&gt; I believe there may be an issue with the DateTime output in the<br>&gt; conversions.rb file.<br>&gt;<br>&gt; As it currently is, no timezone data is output in the string ie:
<br>&gt;<br>&gt; DTSTART:20061218T180000<br>&gt;<br>&gt; I&#39;ve found by changing these lines:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; # UTC time gets a Z suffix<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; if utc<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s &lt;&lt; &quot;Z&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; end<br>
&gt;<br>&gt; to<br>&gt;<br>&gt;&nbsp;&nbsp; s &lt;&lt; self.zone<br>&gt;<br>&gt; I get a line like this:<br>&gt;<br>&gt; DTSTART:20061218T180000Z<br>&gt;<br>&gt; Which is then properly handled by my ICS consumer (Google Calendar and
<br>&gt; ICal).<br>&gt;<br>&gt; Does this seem like a valid fix or am I missing some other timezone support?<br>&gt;<br>&gt; Thanks,<br>&gt; Greg Martin<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------
<br>&gt;<br>&gt; _______________________________________________<br>&gt; icalendar-devel mailing list<br>&gt; <a href="mailto:icalendar-devel@rubyforge.org">icalendar-devel@rubyforge.org</a><br>&gt; <a href="http://rubyforge.org/mailman/listinfo/icalendar-devel">
http://rubyforge.org/mailman/listinfo/icalendar-devel</a><br><br>_______________________________________________<br>icalendar-devel mailing list<br><a href="mailto:icalendar-devel@rubyforge.org">icalendar-devel@rubyforge.org
</a><br><a href="http://rubyforge.org/mailman/listinfo/icalendar-devel">http://rubyforge.org/mailman/listinfo/icalendar-devel</a><br></blockquote></div><br>