10929 Posts in 2613 Topics by 1809 members
Page: 1 2
|Go to End||Next >|
2 October 2009 at 5:16pm
I am having a problem importing my Google Calendar(.ics) into the Event Calendar Module and displaying the correct time. I am using SS2.3.3 with the latest trunk build of the event calendar module (r82). Below is an excerpt from my _config file:
Currently, the events that are showing up on the page imported by the Event Calendar module are off by 4hours. I have attempted to modify the offset which should be correct for EST but it seems to have no affect on the imported .ics file. Below are links to the public calendar I am attempting to import:
I also just noticed a few other problems:
Some events are not showing up at all
When filtering the events, it still displays events not within the specified time frame.
In the actual XML feed it appears that multiple timezones are being used such as EDT. I have reviewed the timezone in the google calendar settings and it is set correctly to Eastern Specific.
I appreciate any input on this issue and will provide any additional details as needed.
3 October 2009 at 2:02am Last edited: 3 October 2009 2:03am
This is unfortunately one of the neglected features of EventCalendar due to lack of testers, so thanks for taking the time to kick the tires a bit.
The events not being filtered properly was caused by a bug I had fixed, but realized I had never checked in. So if you update your SVN, you should get that fix.
I have your ICS running on the demo site here http://eventcalendar.bluehousegroup.com/. Can you tell me what I should be looking for? Which times are wrong? What events are missing? I'll do my best to help you out.
3 October 2009 at 3:57am
Hi Uncle Cheese,
Thank you for your time and assistance. I have been reading your previous post and appreciate the support you provide to the community.
I have compiled a quick & dirty image displaying which events are not being shown in the calendar (indicated in pink) and which events are displayed but with the incorrect time (indicated in blue). It appears the times are off by -4 hours. The majority of the events that are not displayed are repeat events. I included an example of the full event details for both cases. I believe I mentioned before that I noticed different timezones in the RSS feed, below is an excerpt:
Panthers v Tampa Ticket Giveaway
Thursday, October 01, 2009 11:50 PM
When: Sun Oct 18, 2009 1pm to 2:30pm EDT <---------------here
Where: Ruckus Cary
Event Status: confirmed
Mims NCSU / UNC promotion
Thursday, October 01, 2009 3:34 PM
When: Sat Dec 5, 2009 12:30pm to 2:30pm EST <--------------- here
I have been messing around with the calendar and can't quite figure out what is going on here. I look forward to hearing back from you and any help you can provide.
3 October 2009 at 6:37am
This certainly raises a lot of questions. First thing I see is that the ICS is coming in with the wrong times, so this may be a Google setting we don't know about. You'll notice the Uroz wine tasting comes in with the times 4 hours off:
DESCRIPTION:Come Sample Some Great Wines And Buy At A Wholesale Price!!!
SUMMARY:Uroz Wine Tasting
Second thing is that the events that aren't showing up are getting cut because their start dates are our of range.
Let's look at Smokin' Saturdays as an example:
It comes in with a start/end date in September instead of tomorrow.
Also notice in your vCalendar header that there are two parameters for timezone:
That may have something to do with it.
I don't have any answers, but at least we know we can fix it from within the feed.
23 December 2009 at 12:50pm
The issue here is Google exports the time of all their events in UTC (GMT, Zulu, universal time, or whatever you want to call it) even though they specify the time zone in their .ics file. Don't ask me why.
The solution is to offset their time by your local time offset. In event_calendar/code/CalendarUtil.php line 153 replace the function date_info_from_ics with this code:
public static function date_info_from_ics($dtstart, $dtend)
$myOffset = '+1 hours';
$startTimestamp = strtotime($dtstart.$myOffset);
$start_date = date('Y-m-d', $startTimestamp);
$start_time = date('H:i:s', $startTimestamp);
$endTimestamp = strtotime($dtend.$myOffset);
$end_date = date('Y-m-d', $endTimestamp);
$end_time = date('H:i:s', $endTimestamp);
return array($start_date, $end_date, $start_time, $end_time);
Now the time offset works a little funny, I have to set "+1 hours" as the $myOffset variable to get Eastern Standard Time (-5 hours). I haven't had the time to dig into why it works like this, but this is a quick and dirty solution to this problem.
This fix can definitely be improved. If we could get the time offset from the _config.php file that would be nice, or even use the time zone from Google's .ics file. I'll try to look into this if I get time. The big annoyance with this is that I am going to have to change the offset when daylight savings time comes around, and events visible on the calendar after a daylight savings time change will show the incorrect time.
24 December 2009 at 4:25am
Disregard the last paragraph I wrote if you are importing from Google Calendar. After a little testing this morning (my eyes were sore from staring at code last night) it turns out Google makes the DST shift for us in the .ics file. So if you are importing from Google my above solution will work just fine year-round.
If you are importing from some calendar other than Google you should test this.
I would still like to figure out how to get the time zone offset from _config.php.
30 January 2010 at 6:24pm Last edited: 30 January 2010 6:25pm
Is there any way to import events from a CSV file? I need to import events from a CSV file.
And also I need to import from ICS file instead of giving the url in CMS admin.
10 December 2010 at 5:38am Last edited: 10 December 2010 5:39am
I'm having the same problem with the date being 5 hours ahead - the date of the event should be 8 pm on Dec 8th, but it is showing as 1:00 am on Dec 9th. I've imported the .ics from our GroupWise Master Calendar, and it works beautifully, but for the time offset being wrong. I did check the offset in the _config.php, but the .ics data remains unaffected. I also tried the code that coffeymachine suggested but it threw errors.
I see there wasn't really a resolution other than that Google does compensate, but I'm not using Google. (I tried to attach the .ics file I'm using but got "server error".)
"I would still like to figure out how to get the time zone offset from _config.php." - is this possible to correct?
Thanks so much.
Page: 1 2
|Go to Top||Next >|