From: Waitman C. G. <wa...@em...> - 2002-10-17 14:50:59
|
awesome! On Thu, 2002-10-17 at 07:18, Jared wrote: Actually, if you look at the current code in CVS, it reads the file line by line and while the next line starts with a space, it continues to read it. I haven't tested this with a mozilla calendar, but I think it would work fine. Please check it out. This is the patch that Bill Fenner sent us to help with the speed issues. -Jared On Thursday, October 17, 2002, at 08:21 AM, Waitman C. Gobble wrote: > hey chad > > looks great! > > a couple of things. can you add in bill fenner's unfolding routine? the > one i originally wrote last week, that was posted to the user forum, > was > an attempt to make the thing work with mozilla - it only considers a > single broken-line, not multiple ones. my new ones properly unfolds the > lines to rfc but i doubt is compatible with the existing ical_parser. > bill's should snap right in. > > technically there is no limit on continuation of broken lines, so it > should read the file until it DOESN'T find a space or tab character in > the first position of the line. > > regarding the "Z" removal. I originally stuck that in there to get it > to > read in the outlook calendars, but it is technically incorrect. I > haven't worried about it yet, and perhaps it can wait until down the > road however that "Z" means that the time specified DOESN'T use the > timezone info, it is in UTC/GMT/"Zulu" time, ie no offset. In the > parser > below, if a "Z" is at the end of the time spec then it should probably > set some kind of flag that tells the thing it needs to convert the time > specified to local time. (or that it doesn't need to convert it to UTC) > > regarding timezones, I can't find an apple ical file that has the > correct timezone info. do you have any samples? i am really curious at > how we are supposed to guess how the person that created an event > interprets the time they specified and how they have their computer > configured without the VTIMEZONE definitions and offset. > > all of the samples i have seen reference an entity in the TZID > parameter, but they never define it. the only way to really know how to > convert the time back to UTC if is their calendar program lets us know > how their local machine is configured when they create the event. > > of course, perhaps the samples on the apple site were created before > their ical program was fully cooked, and the current release specs it > out correctly... > > btw (i am not sure ben franklin knew what kind of special hell he would > create with his sociological tinkerings. hey, no intended disrespect to > you farmers out there... ;-) > > take care > > waitman > > > > > > > > On Thu, 2002-10-17 at 00:47, Chad wrote: > Ive made a good bit of changes to the parser around DTSTART and > DTEND. > Everything appears to work and its much more flexable (for adding > in > time zone support). Let me know if it breaks anything, Ive checked > all > the sample calendars. > > > what it looks like now: > > if (preg_match("/DTSTART/", $field)) { > $data = ereg_replace('T', '', $data); > $data = ereg_replace('Z', '', $data); > if (preg_match("/DTSTART;VALUE=DATE/", $field)) { > $allday_start = $data; > } else { > ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})', > $data, $regs); > $start_date = $regs[1] . $regs[2] . $regs[3]; > $start_time = $regs[4] . $regs[5]; > } > > } elseif (preg_match("/DTEND/", $field)) { > $data = ereg_replace('T', '', $data); > $data = ereg_replace('Z', '', $data); > if (preg_match("/DTEND;VALUE=DATE/", $field)) { > $allday_end = $data; > } else { > ereg ('([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{0,2})([0-9]{0,2})', > $data, $regs); > $end_date = $regs[1] . $regs[2] . $regs[3]; > $end_time = $regs[4] . $regs[5]; > } > > > Its case-sensitive at the moment, but should be easy to fix, this > solves a problem where if TZID was not set, it would not have a > start > or end time. > > > Night, > Chad > > > > ------------------------------------------------------- > This sf.net email is sponsored by: viaVerio will pay you up to > $1,000 for every account that you consolidate with us. > http://ad.doubleclick.net/clk;4749864;7604308;v? > http://www.viaverio.com/consolidator/osdn.cfm > _______________________________________________ > Phpicalendar-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: viaVerio will pay you up to > $1,000 for every account that you consolidate with us. > http://ad.doubleclick.net/clk;4749864;7604308;v? > http://www.viaverio.com/consolidator/osdn.cfm > _______________________________________________ > Phpicalendar-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel ------------------------------------------------------- This sf.net email is sponsored by: viaVerio will pay you up to $1,000 for every account that you consolidate with us. http://ad.doubleclick.net/clk;4749864;7604308;v? http://www.viaverio.com/consolidator/osdn.cfm _______________________________________________ Phpicalendar-devel mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel |