6.0.0-beta1
7/8/25

[#13223] [Icalendar] Import of ics with a timezone that no longer observes DST fails.
Summary [Icalendar] Import of ics with a timezone that no longer observes DST fails.
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester mrubinsk (at) horde (dot) org
Created 05/27/2014 (4060 days ago)
Due
Updated 06/02/2014 (4054 days ago)
Assigned 05/27/2014 (4060 days ago)
Resolved 06/02/2014 (4054 days ago)
Github Issue Link
Github Pull Request
Milestone Horde_Icalendar 2.0.9
Patch No

History
06/02/2014 09:47:48 AM Jan Schneider State ⇒ Resolved
Milestone ⇒ Horde_Icalendar 2.0.9
 
06/02/2014 09:47:41 AM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit 6fc938acefb19b9acc6225da1aa8fd8a641c60b3
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jun 2 11:47:09 2014 +0200

     Sort timezone rule definitions by end date not start date (Bug #13223).

  framework/Icalendar/lib/Horde/Icalendar.php        |   11 ++-
  .../Icalendar/lib/Horde/Icalendar/Vtimezone.php    |   18 ++--
  framework/Icalendar/package.xml                    |   12 ++-
  .../Icalendar/fixtures/vTimezone/Brisbane.ics      |  103 
++++++++++++++++++++
  .../Icalendar/fixtures/vTimezone/Brisbane.txt      |    2 +
  5 files changed, 131 insertions(+), 15 deletions(-)

http://github.com/horde/horde/commit/6fc938acefb19b9acc6225da1aa8fd8a641c60b3
05/29/2014 03:07:54 PM Jan Schneider Taken from Michael Rubinsky
 
05/27/2014 12:07:18 PM Michael Rubinsky Comment #2
New Attachment: test.ics Download
Reply to this comment
...and the attachment.
05/27/2014 01:51:22 AM Michael Rubinsky Comment #1
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Assigned to Michael Rubinsky
Queue ⇒ Horde Framework Packages
Summary ⇒ [Icalendar] Import of ics with a timezone that no longer observes DST fails.
Type ⇒ Bug
State ⇒ Assigned
Assigned to Jan Schneider
Reply to this comment
For timezones that, at one point in the past, observed DST but no 
longer do, dates will be imported using the offset from the most 
recent vTimezone component without an UNTIL in the RRULE.

For example, the attached ics from Simon Wilson is in 
Australia/Brisbane timezone, which does not observe DST, but did in 
the past. All of the components with RRULEs have UNTIL dates in the 
past because currently this timezone ONLY observes standard time.

However, the most recent component in the vTImezone that does NOT have 
an UNTIL happens to be a component describing a DST transition (other 
DAYLIGHT components appear after this initial one, but they all 
contained UNTIL). So, when Horde_Icalendar_Vtimezone::parseChild() is 
called in Horde_Icalendar_Vtimezone::_parseTZID() this is the most 
recent component that is included in the $change_times array:

array(6) {
   [0]=>
   array(3) {
     ["time"]=>
     int(-1672567140)
     ["from"]=>
     int(36000)
     ["to"]=>
     int(39600)
   }
   [1]=>
   array(3) {
     ["time"]=>
     int(-1665388800)
     ["from"]=>
     int(39600)
     ["to"]=>
     int(36000)
   }
   [2]=>
   array(3) {
     ["time"]=>
     int(-883641600)
     ["from"]=>
     int(36000)
     ["to"]=>
     int(39600)
   }
   [3]=>
   array(3) {
     ["time"]=>
     int(-876124800)
     ["from"]=>
     int(39600)
     ["to"]=>
     int(36000)
   }
   [4]=>
   array(3) {
     ["time"]=>
     int(-860400000)
     ["from"]=>
     int(36000)
     ["to"]=>
     int(39600)
   }
   [5]=>
   array(3) {
     ["time"]=>
     int(-828345600)
     ["from"]=>
     int(36000)
     ["to"]=>
     int(39600)
   }
}


Therefore, when looking for the correct offset to return, the DST 
offset of 39600 is returned instead of the correct 36000.


Saved Queries