By arthurbaars on Monday, 02 April 2012
Replies 4
Likes 0
Views 3K
Votes 0
When I try to import the ical file below, Jevents version 2.1.12 creates an event with this data:
[list]
[*] from: 20071207, at 00:00 (should be 1500)[/*:m]
[*] to: 20071207, at 00:00 (should be 1800)[/*:m]
[*] by date: thursday (should be friday)[/*:m][/list:u]

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)


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
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)
·
12 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
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"
·
12 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
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

				// 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
·
12 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome. Thanks a lot for the patch.
·
12 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post