From jwinn at rescueconcrete.com Mon Jun 25 13:51:11 2007 From: jwinn at rescueconcrete.com (Jason M. Winn) Date: Mon, 25 Jun 2007 10:51:11 -0700 Subject: [iCalendar-devel] saving to web server with icalendar Message-ID: <53202518DA0C084D8BB4A2CF9C6332AC769D31@SERVER.rescueconcrete.local> Hello All, I have the following code. It is currently prompting the user to "save or open the vcs file". Instead...is there a way to have the vcs file get saved to the web server instead of to the user? My code: if request.post? cal = Icalendar::Calendar.new cal.custom_property("METHOD","PUBLISH") event = Icalendar::Event.new event.dtstart = @trackhome.schedule_date event.dtend = @trackhome.pour_date event.summary = @trackhome.company event.description = 'Meet with client' event.klass = "PUBLIC" #event.transp = "TRANSPARENT" event.location = "Manhattan Office" #event.priority = 5 cal.add_event(event) send_data(cal.to_ical, :type => 'text/calendar', :disposition => 'inline; filename=generaljob.vcs', :filename=>'generaljob.vcs') Thank You, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/icalendar-devel/attachments/20070625/4d0d75bf/attachment-0001.html From jwinn at rescueconcrete.com Mon Jun 25 13:48:58 2007 From: jwinn at rescueconcrete.com (Jason M. Winn) Date: Mon, 25 Jun 2007 10:48:58 -0700 Subject: [iCalendar-devel] saving to web server with icalendar Message-ID: <53202518DA0C084D8BB4A2CF9C6332AC769D30@SERVER.rescueconcrete.local> Hello All, I have the following code. It is currently prompting the user to "save or open the vcs file". Instead...is there a way to have the vcs file get saved to the web server instead of to the user? My code: if request.post? cal = Icalendar::Calendar.new cal.custom_property("METHOD","PUBLISH") event = Icalendar::Event.new event.dtstart = @trackhome.schedule_date event.dtend = @trackhome.pour_date event.summary = @trackhome.company event.description = 'Meet with client' event.klass = "PUBLIC" #event.transp = "TRANSPARENT" event.location = "Manhattan Office" #event.priority = 5 cal.add_event(event) send_data(cal.to_ical, :type => 'text/calendar', :disposition => 'inline; filename=generaljob.vcs', :filename=>'generaljob.vcs') Thank You, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/icalendar-devel/attachments/20070625/db22f6ba/attachment.html From AHoward at nocccd.edu Mon Jun 25 14:14:13 2007 From: AHoward at nocccd.edu (Adam Howard) Date: Mon, 25 Jun 2007 11:14:13 -0700 Subject: [iCalendar-devel] all-day events Message-ID: <467FA385.07EE.0042.0@nocccd.edu> Hello, I'm using ruby and icalendar to export my Groupwise calendar so I can view it in Google Calendar (using some code I modified from this: http://timshadel.com/code/tidbits/gw2ical.rb ) but I have an issue with all-day events. As created via this ruby script, an all-day event starts at midnight on the first day and ends at midnight on the next day, like this: DTSTART:20070702T000000 DTEND:20070703T000000 Which unfortunately shows on Google Calendar as starting at midnight and ending at midnight, rather than as an all-day event. On a "real" Google Calendar, if I view the basic.ics file, an all day event shows like this: DTSTART;VALUE=DATE:20070619 DTEND;VALUE=DATE:20070620 I can't figure out if there's a way to get icalendar to write an all-day event in this format, so it will show up correctly in Google Calendar. Am I missing something? Thanks much! Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/icalendar-devel/attachments/20070625/3cffb4fe/attachment.html From john at myquire.com Mon Jun 25 15:22:12 2007 From: john at myquire.com (John Postlethwait) Date: Mon, 25 Jun 2007 12:22:12 -0700 Subject: [iCalendar-devel] all-day events In-Reply-To: <467FA385.07EE.0042.0@nocccd.edu> References: <467FA385.07EE.0042.0@nocccd.edu> Message-ID: Hi Adam, The only way I could get this to work was to store it as a date: "20070702" without the "T000000". I am not sure if that is the correct way. I also noticed that sometimes the Ruby iCalendar library will convert this back to a DateTime string (with the T000000) so you have to be careful of that... I hope that helps in some regard. -John Postlethwait On 6/25/07, Adam Howard wrote: > > Hello, > > I'm using ruby and icalendar to export my Groupwise calendar so I can view > it in Google Calendar (using some code I modified from this: > http://timshadel.com/code/tidbits/gw2ical.rb ) but I have an issue with > all-day events. > > As created via this ruby script, an all-day event starts at midnight on > the first day and ends at midnight on the next day, like this: > DTSTART:20070702T000000 > DTEND:20070703T000000 > Which unfortunately shows on Google Calendar as starting at midnight and > ending at midnight, rather than as an all-day event. On a "real" Google > Calendar, if I view the basic.ics file, an all day event shows like this: > DTSTART;VALUE=DATE:20070619 > DTEND;VALUE=DATE:20070620 > I can't figure out if there's a way to get icalendar to write an all-day > event in this format, so it will show up correctly in Google Calendar. Am I > missing something? > > Thanks much! > > Adam > > > _______________________________________________ > icalendar-devel mailing list > icalendar-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/icalendar-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/icalendar-devel/attachments/20070625/855ccdd8/attachment.html From john at myquire.com Mon Jun 25 15:25:29 2007 From: john at myquire.com (John Postlethwait) Date: Mon, 25 Jun 2007 12:25:29 -0700 Subject: [iCalendar-devel] all-day events In-Reply-To: References: <467FA385.07EE.0042.0@nocccd.edu> Message-ID: Sorry Adam, I left out some details... Here is what I used to do it: event = Icalendar::Event.new event.dtstart Date.parse( dtstart.to_s ), {"VALUE" => ["DATE"]} This will give you the: DTEND;VALUE=DATE:20070620 string you desire. -John Postlethwait On 6/25/07, John Postlethwait wrote: > > Hi Adam, > > The only way I could get this to work was to store it as a date: > "20070702" without the "T000000". I am not sure if that is the correct way. > I also noticed that sometimes the Ruby iCalendar library will convert this > back to a DateTime string (with the T000000) so you have to be careful of > that... > > I hope that helps in some regard. > > -John Postlethwait > > On 6/25/07, Adam Howard wrote: > > > Hello, > > > > I'm using ruby and icalendar to export my Groupwise calendar so I can > > view it in Google Calendar (using some code I modified from this: > > http://timshadel.com/code/tidbits/gw2ical.rb ) but I have an issue with > > all-day events. > > > > As created via this ruby script, an all-day event starts at midnight on > > the first day and ends at midnight on the next day, like this: > > DTSTART:20070702T000000 > > DTEND:20070703T000000 > > Which unfortunately shows on Google Calendar as starting at midnight and > > ending at midnight, rather than as an all-day event. On a "real" Google > > Calendar, if I view the basic.ics file, an all day event shows like > > this: > > DTSTART;VALUE=DATE:20070619 > > DTEND;VALUE=DATE:20070620 > > I can't figure out if there's a way to get icalendar to write an all-day > > event in this format, so it will show up correctly in Google Calendar. Am I > > missing something? > > > > Thanks much! > > > > Adam > > > > > > _______________________________________________ > > icalendar-devel mailing list > > icalendar-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/icalendar-devel > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/icalendar-devel/attachments/20070625/ab7c16e1/attachment.html