Author Topic: [1.6.2] Google ics calendar parse error  (Read 5444 times)

lukacsp

  • Newbie
  • *
  • Posts: 14
    • View Profile
[1.6.2] Google ics calendar parse error
« on: April 27, 2010, 01:34:21 pm »
Hi,

I tried to import my calendar to Google Calendar, but it failed with parse error.

The problem was that my exported ics file containts this:


BEGIN:VCALENDAR
VERSION:2.0
PRODID:PHP
METHOD:REQUEST
X-WR-CALNAME:Lukács Péter
BEGIN:VTIMEZONE
TZID:(GMT+2:00) Athén, Isztanbul, Minszk, Helsinki, Jeruzsálem, Dél-Afrika
BEGIN:STANDARD
TZOFFSETFROM:0200
TZOFFSETTO:0200
END:STANDARD
END:VTIMEZONE


But it should look like this:


BEGIN:VCALENDAR
VERSION:2.0
PRODID:PHP
METHOD:REQUEST
X-WR-CALNAME:Lukács Péter
BEGIN:VTIMEZONE
TZID:(GMT+2:00) Athén, Isztanbul, Minszk, Helsinki, Jeruzsálem, Dél-Afrika
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0200

END:STANDARD
END:VTIMEZONE


I modified the \environment\classes\event\CalFormatUtilities.php to add the extra + character, but im not sure why is it missing. May i missed to set up something related to my timezone or what? I using feng office in a windows 2003 server by the way.

Is it a bug or a user error? ;) Thanks...


hayssam

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: [1.6.2] Google ics calendar parse error
« Reply #1 on: May 12, 2010, 11:22:09 am »
I have the same problem too... And it won't even let me import the calendar to Outlook.

Has anyone found a solution to this bug?

Thank you!

Hayssam

cabeza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1004
    • View Profile
    • Feng Office
Re: [1.6.2] Google ics calendar parse error
« Reply #2 on: May 12, 2010, 12:10:18 pm »
We'll take a look at the standard.

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: [1.6.2] Google ics calendar parse error
« Reply #3 on: May 13, 2010, 05:04:11 pm »
thanks for the fix lukacsp!

the "+" symbol is missing when the user timezone is > 0
the fix in the code is in line 84 of environment/classes/event/CalFormatUtilities.php:
Code: [Select]
$tz = ($user->getTimezone() < 0 ? "-":"+").str_pad(abs($user->getTimezone())*100, 4, '0', STR_PAD_LEFT);

this fix will be in next release.