SOLVED - Bug report: Importing ical file with RRULE weekly
We are looking for developers, forum moderators and translators for this project.
If you would like to help out then please add a message in this forum.
If you would like to help out then please add a message in this forum.
SOLVED - Bug report: Importing ical file with RRULE weekly
by arthurbaars » Mon Apr 02, 2012 4:33 pm
When I try to import the ical file below, Jevents version 2.1.12 creates an event with this data:
It seems that Jevents incorrectly calculates that 20071207 is a thursday, while in fact it is a friday. After explicitly adding ";BYDATE:FR" to the ical event, Jevents does import the right data (both the bydate and the start/end times)
- from: 20071207, at 00:00 (should be 1500)
- to: 20071207, at 00:00 (should be 1800)
- by date: thursday (should be friday)
It seems that Jevents incorrectly calculates that 20071207 is a thursday, while in fact it is a friday. After explicitly adding ";BYDATE:FR" to the ical event, Jevents does import the right data (both the bydate and the start/end times)
- Code: Select all
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Europe/Amsterdam
X-LIC-LOCATION:Europe/Amsterdam
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20071205T101029Z
LAST-MODIFIED:20120302T112412Z
DTSTAMP:20120302T112412Z
UID:33c1680c-1ad1-447e-9a34-aedf50f1e37c
SUMMARY:Some Description
RRULE:FREQ=WEEKLY;INTERVAL=1
DTSTART;TZID=Europe/Amsterdam:20071207T150000
DTEND;TZID=Europe/Amsterdam:20071207T180000
TRANSP:OPAQUE
LOCATION:Somewhere
X-MOZ-GENERATION:162
END:VEVENT
END:VCALENDAR
- Attachments
-
- screenshot of imported event
- test1.png (62.56 KiB) Viewed 855 times
- arthurbaars
- Posts: 9
- Joined: Mon Apr 02, 2012 4:08 pm
Re: Bug report: Importing ical file with RRULE weekly
by carcam » Tue Apr 03, 2012 6:04 am
Hi arthurbaars,
did you configure your timezone settings in the ical import/export tab at JEvents configuration?
By the way, you should also update your JEvents installation to the latest 2.1.14 version to be sure you are in the most up to date version of the software ;o)
did you configure your timezone settings in the ical import/export tab at JEvents configuration?
By the way, you should also update your JEvents installation to the latest 2.1.14 version to be sure you are in the most up to date version of the software ;o)
-
carcam
- Contributor
- Posts: 3391
- Joined: Wed Aug 06, 2008 7:50 pm
- Location: Córdoba
Re: Bug report: Importing ical file with RRULE weekly
by arthurbaars » Tue Apr 03, 2012 7:39 am
My timezone is Europe/Amsterdam, in the component settings and in the import/export settings.
I upgraded to JEvents 2.1.14/ Joomla 2.5.4, and the problem persists. The edit view still looks like the attachment. The curious thing is that the times are correct in the "timesheet" on the "Manage Events" overview.
PS. in my initial post i wrote "BYDATE=FR", this should of course be "BYDAY=FR"
I upgraded to JEvents 2.1.14/ Joomla 2.5.4, and the problem persists. The edit view still looks like the attachment. The curious thing is that the times are correct in the "timesheet" on the "Manage Events" overview.
PS. in my initial post i wrote "BYDATE=FR", this should of course be "BYDAY=FR"
- arthurbaars
- Posts: 9
- Joined: Mon Apr 02, 2012 4:08 pm
Re: Bug report: Importing ical file with RRULE weekly
by Geraint » Tue Apr 03, 2012 8:52 am
Supporting every combination of explicit and implicit value of RRULE values when importing is not easy (as I'm sure you can imagine).
I've not come across an export WEEKLY where BYDAY was not set before now so hadn't dealt with this eventuality.
If you add this code at line 691 of components/com_jevents/libraries/iCalRRule.php (just after currentWeekStart is defined) it should solve this problem
thanks for the detective work - the fix will be in the next release
I've not come across an export WEEKLY where BYDAY was not set before now so hadn't dealt with this eventuality.
If you add this code at line 691 of components/com_jevents/libraries/iCalRRule.php (just after currentWeekStart is defined) it should solve this problem
- Code: Select all
// no BYDAY specified
if ($this->byday==""){
$daynames = array("SU","MO","TU","WE","TH","FR","SA","SU");
$this->byday = "+".$daynames[$currentWeekDay];
$days = array($this->byday) ;
}
thanks for the detective work - the fix will be in the next release
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.
Join the JEvents club today!
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.
Join the JEvents club today!
-

Geraint - Posts: 30507
- Joined: Fri Feb 15, 2008 6:14 pm
Re: Bug report: Importing ical file with RRULE weekly
by arthurbaars » Tue Apr 03, 2012 9:03 am
You're welcome. Thanks a lot for the patch.
- arthurbaars
- Posts: 9
- Joined: Mon Apr 02, 2012 4:08 pm
5 posts
• Page 1 of 1
Return to Contribute to JEvents
Who is online
Users browsing this forum: No registered users

