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> <<a href="mailto:jeff@rosejn.net">jeff@rosejn.net</a>> 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's<br>a bit of a pain. There are two options for specifying time in an ical<br>file. If you use local time, then you just use the regular format and
<br>you do not include a 'Z'. If you are specifying the time in UTC then<br>you include the 'Z'. 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. 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 => "CET"<br>DateTime.now.zone => "+0100"<br><br>These would incorrectly add garbage to the end of the string...
<br><br>So yeah, I'm not sure what the best solution is. 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>> I believe there may be an issue with the DateTime output in the<br>> conversions.rb file.<br>><br>> As it currently is, no timezone data is output in the string ie:
<br>><br>> DTSTART:20061218T180000<br>><br>> I've found by changing these lines:<br>><br>> # UTC time gets a Z suffix<br>> if utc<br>> s << "Z"<br>> end<br>
><br>> to<br>><br>> s << self.zone<br>><br>> I get a line like this:<br>><br>> DTSTART:20061218T180000Z<br>><br>> Which is then properly handled by my ICS consumer (Google Calendar and
<br>> ICal).<br>><br>> Does this seem like a valid fix or am I missing some other timezone support?<br>><br>> Thanks,<br>> Greg Martin<br>><br>><br>> ------------------------------------------------------------------------
<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><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>