- From: Dan Connolly <connolly@w3.org>
- Date: Tue, 28 Oct 2003 07:34:14 -0600
- To: Charles McCathieNevile <charles@w3.org>
- Cc: www-rdf-calendar@w3.org
On Mon, 2003-10-27 at 18:03, Charles McCathieNevile wrote: > Hi, > > I am trying to work out how to put my flight data into my calendars (phone > and laptop). > > I recieve the information as a dump from a computer system, with all > timezones local - but I know which airport the arrival time is local to. > > Is it more use to convert the arrival time back to the timezone of departure, > or can I pass an event with seperate timezones for start and end times (since > I am modelling each flight as an event)? iCalendar groks different timezones for start and end times. Here's the rule I use: { :FLT k:startingDate [ dt:date :YYMMDD]; k:endingDate [ dt:date :YYMMDD2]; t:departureTime :HH_MM; k:fromLocation [ :timeZone [ cal:tzid :TZ] ]; t:arrivalTime :HH_MM2; k:toLocation [ :timeZone [ cal:tzid :TZ2] ]. :DTSTART is str:concatenation of (:YYMMDD "T" :HH_MM ":00"). #@@ extra punct in dates :DTEND is str:concatenation of (:YYMMDD2 "T" :HH_MM2 ":00"). ( :FLT!log:rawUri "@uri-2-mid.w3.org") str:concatenation :UID. #@@hmm... kludge? } log:implies { :FLT a cal:Vevent; cal:uid :UID; cal:dtstart [ cal:tzid :TZ; cal:dateTime :DTSTART ]; cal:dtend [ cal:tzid :TZ2; cal:dateTime :DTEND ]. }. http://www.w3.org/2000/10/swap/pim/itin2ical.n3 as explained in http://www.w3.org/2000/10/swap/pim/travel.html > A similar question arises in how to handle the location of the event - I > think in RDF I will simply have a start-location and an end-location, but to > convert into iCal I'll make a processable string of the two locations such as > > iata:MUC-iata:EWR <leaving from Munich, arriving Newark> > > that I can export out again... > > I suspect this is really a question related to what tools can handle > easily... Yes, you can model whatever you want; but if you want to interoperate with icalendar tools, you need to model things the icalendar way. Fortunately, it's pretty flexible in this regard. > > thoughts? > > Chaals -- Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Tuesday, 28 October 2003 08:34:15 UTC