Revision: 1695
http://mrbs.svn.sourceforge.net/mrbs/?rev=1695&view=rev
Author: cimorrison
Date: 2010-12-11 20:49:12 +0000 (Sat, 11 Dec 2010)
Log Message:
-----------
Fixed a bug which caused calendar info not to be imported by some calendar apps
(eg Microsoft Exchange Server)
Modified Paths:
--------------
mrbs/branches/ics_attachments/web/functions_ical.inc
Modified: mrbs/branches/ics_attachments/web/functions_ical.inc
===================================================================
--- mrbs/branches/ics_attachments/web/functions_ical.inc 2010-12-11
17:54:21 UTC (rev 1694)
+++ mrbs/branches/ics_attachments/web/functions_ical.inc 2010-12-11
20:49:12 UTC (rev 1695)
@@ -135,7 +135,7 @@
// Create an RFC 5545 iCalendar Event component
function create_ical_event($data, $text_description, $html_description,
$addresses, $series=FALSE)
{
- global $timezone, $confirmation_enabled, $mail_settings;
+ global $confirmation_enabled, $mail_settings;
$use_html = $mail_settings['html'] && !empty($html_description);
@@ -148,8 +148,12 @@
{
$results[] = "RRULE:" . create_rrule($data);
}
- $results[] = "DTSTART;TZID=$timezone:" . date(RFC5545_FORMAT,
$data['start_time']);
- $results[] = "DTEND;TZID=$timezone:" . date(RFC5545_FORMAT,
$data['end_time']);
+ // Note: we use UTC time here. If you are going to use a timezone and the
TZID
+ // parameter then RFC 5545 says you MUST provide a corresponding VTIMEZONE
component.
+ // Some calendar apps, eg Microsoft Exchange, enforce the standard and fail
to import
+ // calendar objects that use TZID without a corresponding VTIMEZONE.
+ $results[] = "DTSTART:" . gmdate(RFC5545_FORMAT . '\Z', $data['start_time']);
+ $results[] = "DTEND:" . gmdate(RFC5545_FORMAT . '\Z', $data['end_time']);
$results[] = "SUMMARY:" . ical_escape_text($data['name']);
// Put the HTML version in an ALTREP, just in case there are any Calendars
out there
// that support it (although at the time of writing, Dec 2010, none are
known)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits