r28290 - /trunk/calendar/inc/class.calendar_timezones.inc.php

View: New views
1 Messages — Rating Filter:   Alert me  

r28290 - /trunk/calendar/inc/class.calendar_timezones.inc.php

by ralfbecker :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Author: ralfbecker
Date: Tue Nov 10 21:38:00 2009
New Revision: 28290

URL: http://www.egroupware.org/viewvc/egroupware?rev=28290&view=rev
Log:
"UTC is treated specially: it's implicitly mapped to tz_id=-1 (to be able to store it for events), but calendar_ical creates NO VTIMEZONE component for it."

Modified:
    trunk/calendar/inc/class.calendar_timezones.inc.php

Modified: trunk/calendar/inc/class.calendar_timezones.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/calendar/inc/class.calendar_timezones.inc.php?rev=28290&r1=28289&r2=28290&view=diff
==============================================================================
--- trunk/calendar/inc/class.calendar_timezones.inc.php (original)
+++ trunk/calendar/inc/class.calendar_timezones.inc.php Tue Nov 10 21:38:00 2009
@@ -24,6 +24,9 @@
  *
  * Mapping Windows timezone to standard TZID's:
  * @link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/windows_tzid.html
+ *
+ * UTC is treated specially: it's implicitly mapped to tz_id=-1 (to be able to store it for events),
+ * but calendar_ical creates NO VTIMEZONE component for it.
  */
 class calendar_timezones
 {
@@ -149,6 +152,16 @@
  {
  self::$tz_cache =& egw_cache::getSession(__CLASS__,'tz_cache');
  self::$tz2id =& egw_cache::getSession(__CLASS__,'tz2id');
+
+ // init cache with mapping UTC <--> -1, as UTC is no real timezone, but we need to be able to use it in calendar
+ if (!is_array(self::$tz2id))
+ {
+ self::$tz_cache = array('-1' => array(
+ 'tzid' => 'UTC',
+ 'id' => -1,
+ ));
+ self::$tz2id = array('UTC' => -1);
+ }
  }
 
  /**


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
eGroupWare-cvs mailing list
eGroupWare-cvs@...
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs