iCal does not appear to import Z time format.

ShadowCaster - October 29, 2009 - 15:28
Project:iCal feed parser
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I attempted to import some iCal entries generated by a version of the PHP calendar program available on SourceForge. Unfortunately, we're running the 6.14 core, so I was forced to use the 6x.x-1.9-beta2 FeedAPI, so that might be the source of the problem, but it really looks like an issue with iCal. Anyway, I successfully imported the calendar events and everything looked OK except for the times, which were 6 or 5 hours off depending on the date. I do have my timezone set correctly, although I don't believe that should have been a factor.

Here is an example iCal entry:

BEGIN:VEVENT
UID:20091028T173553Z-2000073-15272
SUMMARY: ShadowCaster's most excellent party
DESCRIPTION: Come ready to party
CLASS:PUBLIC
ATTENDEE;ROLE=OWNER;STATUS=CONFIRMED:Default Administrator
ATTENDEE;ROLE=ATTENDEE;STATUS=CONFIRMED: <>
DTSTART:20090524T180000Z
DTSTAMP:20091028T173553Z
DTEND:20090524T213000Z
END:VEVENT

This event occurs from 1:00 PM to 4:30 PM central daylight time. I believe that the times in this entry are correct for Zulu time. However, this is the row that is placed in the database:

vid=280, nid=280, delta=0, field_datetime_value 2009-05-24 23:00:00, field_datetime_value2=2009-05-25 02:30:00

When I look at the calendar entry for this date, I see that the event has a start time of 2009/05/24 06:00PM and an ending time of 2009/05/24 21:30:00.

After I adjust the time of the calendar event by hand, I see in the database:

vid=280, nid=280, delta=0, field_datetime_value 2009-05-24 18:00:00, field_datetime_value2=2009-05-24 21:30:00

Which is what I expected.

Again, I almost raised this against the beta FeedAPI, but the iCal parser seems like it is most likely the culprit.

#1

ekes - October 29, 2009 - 15:35

Or the mapper and timezones.

The parser is correctly sending on the information that this is the Time and it's in UTC. Your situation anything like http://drupal.org/node/451888

#2

ShadowCaster - October 29, 2009 - 19:21

Could be, except that issue says repeating events are not affected, and they were affected for me. Normally, I'd like to dig into the code myself, but we're going live tomorrow, and I just don't have the time. My spider sense is telling me it's the beta feed module that's at fault, but I don't have time to confirm it. Sadly, I had to assign the blame to some project, so I decided to start at the front end of the pipe.

#3

ShadowCaster - October 29, 2009 - 19:23

Some of the comments in the previous issue state that the database is set in UCT. Is this actually an attribute of the database? I'll look, when I get time. Perhaps the problem is with our database configuration.

 
 

Drupal is a registered trademark of Dries Buytaert.